Anash P. Oommen: > Working with the sandbox got slightly more complex with v201109 > release, since clientEmail header is no longer supported. Also, > clientId is not the right header name, it should be clientCustomerId.
Thanks! I guess the example at http://code.google.com/apis/adwords/docs/#soap uses the newest API version with old XML and hence my misadventures, then. > To use the sandbox with v201109, you could follow this sequence: > 1. Call getAllCampaigns without any clientCustomerId header. This > will give you an empty list, but will also initialize the sandbox. This worked with your example, thanks! > 2. Call getAccountHierarchy without any clientCustomerid header. > This will give you the sandbox accounts, and their customer ids. This didn’t work; with the XML examples you sent I’m getting ‘Unmarshalling Error: unexpected element (uri:"https://adwords.google.com/api/adwords/mcm/v201109", local:"RequestHeader")’, with the suggestion that the URI for RequestHeader should end with …/cm/v201109, not …/mcm/v201109. Changing the xmlns of RequestHeader to …/cm/v201109 makes the response say ‘Unexpected wrapper element {https://adwords.google.com/api/adwords/mcm/v201109}get found.’ Changing the get’s xmlns to end with …/cm/v201109 yields ‘Unmarshalling Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'selector'.’ Changing <selector> to the suggested <serviceSelector> yields ‘Unmarshalling Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'enablePaging'.’ Changing <enablePaging>…</enablePaging> to <paging/> (as it’s element-only) yields SelectorError.MISSING_FIELDS. I stopped ‘fixing’ stuff here as I guess I went too far in the wrong direction by now. :) Are you sure the second request example (the only one with …/mcm/v201109 xmlnses) is valid? > The detailed logs are given below for > your reference, and will work with curl. Maybe I’m using curl wrong? The first request+respone worked, the second broke as described above. I’m calling it like in the tutorial: curl --header "Content-Type: application/soap+xml" --data @2.xml https://adwords-sandbox.google.com/api/adwords/cm/v201109/CampaignService > That said, try using a client library for easier development. That’s the plan (the Ruby lib in my case), except I noticed it doesn’t support v201109 yet (please correct me if I’m wrong here). I need per-location keyword stats – and to the best of my reading of release notes Location was added to TrafficEstimatorService in v201109 (again, I’d love to be wrong). — Piotr Szotkowski -- 7.times{k=0;puts ($*.map!{|i|k+k=i}<<1)*" "}
signature.asc
Description: Digital signature