Hi,

There are a few problems I've spotted with the request:

  1) AdWords API namespaces shouldn't include the service name (should
be "https://adwords.google.com/api/adwords/o/v200909";).

  2) This request should use a mix of the O and CM namespaces
("https://adwords.google.com/api/adwords/o/v200909"; and "https://
adwords.google.com/api/adwords/cm/v200909").  In general, fields of
the selector object have O namespaces and the fields of the shared CM
objects have CM namespaces.

  3) The header fields should be contained within a RequestHeader
object.

  4) The header fields should not contain an email and password, but
instead an authToken field with a value generated by the ClientLogin
service.

  5) The search parameters should be typed, and there should be a
searchParameters element for each type of parameter.

  6) The matchType field values should be capitalized.

  7) The paging startIndex is zero-based.

Here is what the correctly formatted request would look like:

  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:o="https://adwords.google.com/api/adwords/o/v200909";
xmlns:cm="https://adwords.google.com/api/adwords/cm/v200909";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
     <soapenv:Header>
        <o:RequestHeader>
           <cm:applicationToken>X</cm:applicationToken>
           <cm:authToken>X</cm:authToken>
           <cm:clientEmail>X</cm:clientEmail>
           <cm:developerToken>X</cm:developerToken>
           <cm:userAgent>X</cm:userAgent>
        </o:RequestHeader>
     </soapenv:Header>
     <soapenv:Body>
        <o:get>
           <o:selector>
              <o:searchParameters
xsi:type="o:RelatedToKeywordSearchParameter">
                 <o:keywords>
                    <cm:text>awesome domain</cm:text>
                    <cm:matchType>BROAD</cm:matchType>
                 </o:keywords>
              </o:searchParameters>
              <o:searchParameters
xsi:type="o:LanguageTargetSearchParameter">
                 <o:languageTargets>
                    <cm:languageCode>en</cm:languageCode>
                 </o:languageTargets>
              </o:searchParameters>
              <o:searchParameters
xsi:type="o:CountryTargetSearchParameter">
                 <o:countryTargets>
                    <cm:countryCode>US</cm:countryCode>
                 </o:countryTargets>
              </o:searchParameters>
              <o:ideaType>KEYWORD</o:ideaType>
              <o:requestType>IDEAS</o:requestType>
              <o:paging>
                 <cm:startIndex>0</cm:startIndex>
                 <cm:numberResults>200</cm:numberResults>
              </o:paging>
           </o:selector>
        </o:get>
     </soapenv:Body>
  </soapenv:Envelope>

Best,
- Eric Koleda, AdWords API Team

On Nov 19, 6:20 pm, Owen <o...@borseth.us> wrote:
> Hello. I'm trying to get this working using the new API and I'm having
> some issues. Here the XML followed by the response I am getting back.
> Thanks!
>
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns="https://adwords.google.com/api/adwords/o/v200909/
> TargetingIdeaService">
>   <soap:Header>
>     <email>X</email>
>     <username>X</username>
>     <password>X</password>
>     <useragent>X</useragent>
>     <developerToken>X</developerToken>
>     <applicationToken>X</applicationToken>
>   </soap:Header>
>   <soap:Body>
>     <get xmlns="https://adwords.google.com/api/adwords/o/v200909";>
>       <selector>
>         <searchParameters>
>           <keywords>
>             <text>awesome domain</text>
>             <matchType>Broad</matchType>
>           </keywords>
>           <languageTargets>
>             <languageCode>en</languageCode>
>           </languageTargets>
>           <countryTargets>
>             <countryCode>US</countryCode>
>           </countryTargets>
>         </searchParameters>
>         <ideaType>KEYWORD</ideaType>
>         <requestType>IDEAS</requestType>
>         <paging>
>           <startIndex>1</startIndex>
>           <numberResults>200</numberResults>
>         </paging>
>       </selector>
>     </get>
>   </soap:Body>
> </soap:Envelope>
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
> envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</
> faultcode><faultstring>Fault occurred while processing.</faultstring></
> soap:Fault></soap:Body></soap:Envelope>

--

You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-...@googlegroups.com.
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=.


Reply via email to