Upgrading to v201206

457 views
Skip to first unread message

Simon Day

unread,
Jul 13, 2012, 8:16:41 AM7/13/12
to adwor...@googlegroups.com
Hi,

We have developed a number of custom VB functions to enable reporting on and managing Adwords accounts. I'm trying to upgrade from v201109 to v201206 but seem to be having issues straight away!

The first thing I need to do is list the client accounts under a given MCC account. I can see the service I need to use has changed from ServicedAccountService to ManagedCustomerService, so having updated to this and swapped the 'Selector' to 'serviceSelector', and specified valid fields but am getting the error "[SelectorError.MISSING_FIELDS @ serviceSelector]" when posting to the production environment, and "InternalApiError.UNEXPECTED_INTERNAL_API_ERROR" when posting to the sandbox.

My XML looks like this:
<?xml version='1.0' encoding='utf-8'?>
<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xmlns:xsd='http://www.w3.org/2001/XMLSchema'
    xmlns:cm='https://adwords.google.com/api/adwords/cm/v201206'
    xmlns:mcm='https://adwords.google.com/api/adwords/mcm/v201206'>
  <soap:Header>
    <mcm:RequestHeader>
      <cm:authToken>XXX</cm:authToken>
      <cm:applicationToken>YYY</cm:applicationToken>
      <cm:developerToken>ZZZ</cm:developerToken>
    </mcm:RequestHeader>
  </soap:Header>
  <soap:Body>
    <get xmlns='https://adwords.google.com/api/adwords/mcm/v201206'>
      <serviceSelector>
        <fields>Name</fields>
        <fields>Login</fields>
        <fields>CompanyName</fields>
        <fields>CustomerId</fields>
        <fields>CanManageClients</fields>
        <fields>CurrencyCode</fields>
        <fields>DateTimeZone</fields>
      </serviceSelector>
    </get>
  </soap:Body>
</soap:Envelope>

Can anyone point me in the right direction?

Thanks
Simon

Kevin Winter

unread,
Jul 24, 2012, 3:28:25 PM7/24/12
to adwor...@googlegroups.com
Hi Simon,
  The ManagedCustomerService uses a Generic Selector (unlike the ServicedAccountService, which used it's own).  This selector is shared from the CM namespace: https://developers.google.com/adwords/api/docs/reference/latest/ManagedCustomerService.Selector

You will need an xmlns='https://adwords.google.com/api/adwords/cm/v201206' on the serviceSelector element (I believe) - just like how you specify the cm namespace for the RequestHeader elements.

Might I recommend the VB.net client library that handles this for you?

- Kevin Winter
AdWords API Team

David Lin

unread,
Oct 25, 2012, 9:06:46 AM10/25/12
to adwor...@googlegroups.com
Hi Kevin,

We tried to upgrade to v201209 and we have the same problem. I have tried to add xmlns='https://adwords.google.com/api/adwords/cm/v201209' on the serviceSelector element. but we still receive the same error message. Could you please more specify exactly how the XML will look like?

Many thanks.

David

David Lin

unread,
Oct 25, 2012, 9:09:45 AM10/25/12
to adwor...@googlegroups.com
Hi Simon,

we have the problem when upgrade to v201209, we also use vb, did you fix this problem? if so, could you pleaase share your answer on how to fix this problem?

Many thanks.

David

Kevin Winter

unread,
Oct 25, 2012, 11:08:15 AM10/25/12
to adwor...@googlegroups.com
Hi David,
  Here's an example of an MCS.get call from the Java Library:

    <soapenv:Header>
        <ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/mcm/v201209" soapenv:mustUnderstand="0">
            <ns2:authToken xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201209">...</ns2:authToken>
            <ns3:developerToken xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201209">...</ns3:developerToken>
            <ns4:userAgent xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201209">FooBar (AwApi-Java, AdWords-Axis/internal, Common-Java/1.10.1, Axis/1.4, Java/1.7.0-google-v5, internal)</ns4:userAgent>
            <ns5:validateOnly xmlns:ns5="https://adwords.google.com/api/adwords/cm/v201209">false</ns5:validateOnly>
            <ns6:partialFailure xmlns:ns6="https://adwords.google.com/api/adwords/cm/v201209">false</ns6:partialFailure>
        </ns1:RequestHeader>
    </soapenv:Header>
    <soapenv:Body>
            <serviceSelector>
                <ns7:fields xmlns:ns7="https://adwords.google.com/api/adwords/cm/v201209">Login</ns7:fields>
                <ns8:fields xmlns:ns8="https://adwords.google.com/api/adwords/cm/v201209">CustomerId</ns8:fields>
                <ns9:fields xmlns:ns9="https://adwords.google.com/api/adwords/cm/v201209">Name</ns9:fields>
            </serviceSelector>
        </get>
    </soapenv:Body>
</soapenv:Envelope>

We strongly recommend that you use one of our client libraries as they handle these namespace issues for you.  Our DotNet client library supports VB DotNet.

- Kevin Winter
AdWords API Team

Message has been deleted

Kevin Winter (AdWords API Team)

unread,
Jan 23, 2013, 9:28:28 AM1/23/13
to adwor...@googlegroups.com
Hi Bernardo,
  Could you post a sanitized (blank out developer and auth tokens) sample request?  Are you authenticating with an MCC account?  Are you targeting an MCC account or a client account (or no target, which effectively uses the account you authenticate with).

- Kevin Winter
AdWords API Team

On Friday, January 4, 2013 7:55:33 AM UTC-5, Bernardo Alves wrote:
Hi Kevin,

I tried this example to request information from ManagedCustomerService but I keep getting "internal server error". Any ideas of what might be going wrong?

Thanks,
Bernardo
Reply all
Reply to author
Forward
0 new messages