Request xml was invalid

99 views
Skip to first unread message

Chris

unread,
Aug 1, 2006, 12:15:43 PM8/1/06
to AdWords API Forum
Hi,

Hope someone can help here - I can just trying to grab some overview
stats from an account, but am getting a 'request xml was invalid'
error. I cannot see what the problem is, so if anyone has any ideas
they'd be much appreciated.

My actual xml input is:

<SOAP-ENV:Header><email>x...@xxx.com</email><password>XXXXXX</password><useragent>MyUserAgent</useragent><clientEmail>XX...@xxx.com</clientEmail><token>xxxxxxxxxxx</token></SOAP-ENV:Header><SOAP-ENV:Body><getCampaignStats><campaignIds>2889970</campaignIds><campaignIds>2918110</campaignIds><startDay>2006-07-21</startDay><endDay>2006-07-21</endDay></getCampaignStats></SOAP-ENV:Body></SOAP-ENV:Envelope>

Any help would be much appreciated!

Best wishes,

Chris

Richard Jones

unread,
Aug 1, 2006, 12:55:08 PM8/1/06
to Chris, AdWords API Forum
On Tue, Aug 01, 2006 at 09:15:43AM -0700, Chris wrote:
> <SOAP-ENV:Header><email>x...@xxx.com</email><password>XXXXXX</password><useragent>MyUserAgent</useragent><clientEmail>XX...@xxx.com</clientEmail><token>xxxxxxxxxxx</token></SOAP-ENV:Header><SOAP-ENV:Body><getCampaignStats><campaignIds>2889970</campaignIds><campaignIds>2918110</campaignIds><startDay>2006-07-21</startDay><endDay>2006-07-21</endDay></getCampaignStats></SOAP-ENV:Body></SOAP-ENV:Envelope>

I guess the most obvious problems are the lack of <SOAP-ENV:Envelope>
at the beginning of the request and the lack of XML header. There may
be others...

Rich.

--
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com

Chris

unread,
Aug 2, 2006, 7:46:35 AM8/2/06
to AdWords API Forum
Thanks Richard - I didn't copy in the entire request. I do think I am
including all the necessary elements... Very frustrating!

I am inputting (to the campaign service):

<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:si="http://soapinterop.org/xsd"
xmlns:impl="https://adwords.google.com/api/adwords/v4"
xmlns:ns8241="http://tempuri.org"><SOAP-ENV:Header><email>######</email><password>####</password><useragent>####</useragent><clientEmail>#####</clientEmail><token>alkdlkjdkjkjkj</token></SOAP-ENV:Header><SOAP-ENV:Body><getCampaignStats><campaignIds>2889970</campaignIds><campaignIds>2918110</campaignIds><campaignIds>4969690</campaignIds><campaignIds>4995520</campaignIds><campaignIds>5456320</campaignIds><campaignIds>5597860</campaignIds<startDay>2006-07-21</startDay><endDay>2006-07-21</endDay></getCampaignStats></SOAP-ENV:Body></SOAP-ENV:Envelope>

If anyone can spot a problem with this I'd be reaaally appreciative!

Thanks v much,

Chris

Richard Jones

unread,
Aug 2, 2006, 9:25:12 AM8/2/06
to Chris, AdWords API Forum
On Wed, Aug 02, 2006 at 04:46:35AM -0700, Chris wrote:
>
> Thanks Richard - I didn't copy in the entire request. I do think I am
> including all the necessary elements... Very frustrating!
>
> I am inputting (to the campaign service):

If you format it, you'll see that the problem appears to be a missing
'>' character in one of the </campaignIds>:

You can easily find this by running your XML through a program such as
tidy (http://tidy.sourceforge.net/).

Reply all
Reply to author
Forward
0 new messages