Below is the error we get returned.
System.InvalidOperationException: There is an error in XML document
(12, 34). ---> System.FormatException: Input string was not in a
correct format.
at System.Number.ParseInt64(String s, NumberStyles style,
NumberFormatInfo info)
at System.Int64.Parse(String s, NumberStyles style, IFormatProvider
provider)
at System.Xml.XmlConvert.ToInt64(String s)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read2_BudgetOptimizerSettings(Boolean
isNullable, Boolean checkType)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read1_Campaign(Boolean
isNullable, Boolean checkType)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read34_getAllAdWordsCampaignsResponse()
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader)
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at
Bridge_it.V2.Google.com.google.adwords1.CampaignService.getAllAdWordsCampaigns(Int32
dummy) in c:\...\web references\com.google.adwords1\reference.cs:line
135
at Bridge_it.V2.Google.Connection.GetCampaigns(String myAgent,
String myUser, String myPass, String myToken, String myAppToken, String
myEmail) in c:\...\bridge-it.v2.google.connection.cs:line 304
Below is the code we use to call the getAllAdWordsCampaigns function.
/******************************************************************************************
* This function generates a list of all campaigns
*****************************************************************************************/
internal Campaign[] GetCampaigns(string myAgent, string myUser, string
myPass, string myToken, string myAppToken, string myEmail)
{
CampaignService myService = new CampaignService();
Campaign[] CampaignList=null;
// Configure the connection with Google
myService.Timeout = 300000;
myService.useragentValue = new com.google.adwords1.useragent();
myService.useragentValue.Text = new String[] { myAgent };
myService.emailValue = new com.google.adwords1.email();
myService.emailValue.Text = new String[] { myUser };
myService.passwordValue = new com.google.adwords1.password();
myService.passwordValue.Text = new String[] { myPass };
myService.developerTokenValue = new
com.google.adwords1.developerToken();
myService.developerTokenValue.Text = new String[] { myToken };
myService.applicationTokenValue = new
com.google.adwords1.applicationToken();
myService.applicationTokenValue.Text = new String[] { myAppToken };
myService.clientEmailValue = new com.google.adwords1.clientEmail();
myService.clientEmailValue.Text = new String[] { myEmail };
// Configure the job
try
{
CampaignList = myService.getAllAdWordsCampaigns(0);
}
catch(Exception e)
{
WriteOutput ( e.ToString());
}
return CampaignList;
}
Anyone got a idea whats wrong?
Kind regards,
Vincent Meijer
Junior Developer - ClearSense
java.lang.ClassCastException:
com.google.api.adwords.v7.ReportServiceSoapBindingStub
because of the mismatch.
I think for now, I am going to upgrade to v7, instead of v8, until
things get worked out.
the only difference in code between our V7 and V8 code is:
with V8:
CampaignService myService = new CampaignService();
with V7:
CampaignServiceService myService = new
CampaignServiceService();
the google code is just the by VS2003 generated code based on the
WSDL's.
There is an issue affecting the CampaignService that is causing these
problems.
We have a resolution that should be in place this week.
Thanks,
Aaron Karp
AdWords API Team
Aaron Karp
AdWords API Team
On Jan 22, 4:56 pm, "AdWordsAPIAdvisor" <adwordsapiadvi...@google.com>
wrote:
I just download the adwords-0.8.1.zip from http://sourceforge.net/
project/showfiles.php?group_id=140299
You know i got many problem with adwords API (please see my post :
http://groups.google.com/group/adwords-api/browse_thread/thread/
440d4590f32b1370
I know this API is a beta but ....
On Jan 25, 4:23 am, "AdWordsAPIAdvisor" <adwordsapiadvi...@google.com>
wrote: