getAllAdWordsCampaigns problems after updating to V8

4 views
Skip to first unread message

ClearSense

unread,
Jan 19, 2007, 5:41:50 AM1/19/07
to AdWords API Forum
After updating to V8 we are getting a error when using the
CampaignService.getAllAdWordsCampaigns. We are using the WSDL as Web
Reference, and haven't changed the generated code.

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

dr7d7

unread,
Jan 19, 2007, 5:42:35 PM1/19/07
to AdWords API Forum
I am also experiencing some problems with the new v8 client. I think
there are v7 libraries intermingled in the v8 code. What the client jar
has, is a mix of v7 and v8, they didn't update that file correctly, on
google's adwords api svn. They still have v7 in BaseCredentials. I am
also getting exceptions like:

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.

ClearSense

unread,
Jan 22, 2007, 4:14:28 AM1/22/07
to AdWords API Forum
Tried a few things. Only way i get my code working again is falling
back to V7 and thats not a solution me or my manager can live with. So
my code works with V7 but won't with V8. anyone else got the same
problem?

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.

AdWordsAPIAdvisor

unread,
Jan 22, 2007, 4:56:37 PM1/22/07
to AdWords API Forum
Hi ClearSense

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

AdWordsAPIAdvisor

unread,
Jan 24, 2007, 4:23:13 PM1/24/07
to AdWords API Forum
The fix for this has gone through. Please post again if you continue to
experience any problems. Thanks.

Aaron Karp
AdWords API Team

On Jan 22, 4:56 pm, "AdWordsAPIAdvisor" <adwordsapiadvi...@google.com>
wrote:

Nicolas

unread,
Feb 5, 2007, 4:09:50 AM2/5/07
to AdWords API Forum
I still have this problem :)

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:

Reply all
Reply to author
Forward
0 new messages