I'm stuck trying to get the example with cURL from the page to 
work: https://developers.google.com/adwords/api/docs/guides/basic-concepts

The code 

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <soapenv:Header>
<ns1:RequestHeader 
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"; 
soapenv:mustUnderstand="0" 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201506";>
  <ns1:clientCustomerId>MY_TEST_ACCOUNT_ID</ns1:clientCustomerId>
  <ns1:developerToken>MY_NON_APPROVED_TOKEN</ns1:developerToken>
  <ns1:userAgent>Foo Bar (fizzbuzz)</ns1:userAgent>
  <ns1:validateOnly>false</ns1:validateOnly>
  <ns1:partialFailure>false</ns1:partialFailure>
</ns1:RequestHeader>
  </soapenv:Header>
  <soapenv:Body>
<mutate xmlns="https://adwords.google.com/api/adwords/cm/v201506";>
  <operations>
    <operator>ADD</operator>
    <operand>
      <name>Hello World</name>
      <status>PAUSED</status>
      <budget>
        <budgetId>987654321</budgetId>
      </budget>
      <settings xsi:type="ns2:GeoTargetTypeSetting" 
xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201506";>
        <positiveGeoTargetType>DONT_CARE</positiveGeoTargetType>
      </settings>
      <settings xsi:type="ns3:KeywordMatchSetting" 
xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201506";>
        <optIn>false</optIn>
      </settings>
      <networkSetting>
        <targetGoogleSearch>true</targetGoogleSearch>
        <targetSearchNetwork>true</targetSearchNetwork>
        <targetContentNetwork>false</targetContentNetwork>
      </networkSetting>
      <biddingStrategyConfiguration>
        <biddingScheme xsi:type="ns4:ManualCpcBiddingScheme" 
xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201506";>
          <enhancedCpcEnabled>false</enhancedCpcEnabled>
        </biddingScheme>
      </biddingStrategyConfiguration>
    </operand>
  </operations>
</mutate>
  </soapenv:Body>
</soapenv:Envelope>

I've got my Oauth token and I copy pasted and replaced the values in the 
example payload with my own details but when I try to run it it outputs an 
error

curl --header "Content-Type: application/soap+xml" \                       
                                                                            
      
     --header "Authorization : Bearer ya29.LONGLONGLONGSTRING" \
     --data @data.xml \
       https://adwords.google.com/api/adwords/cm/v201506/CampaignService

And the error:
<soap:Envelope 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Unmarshalling
 
Error: cvc-elt.4.2: Cannot resolve 'ns3:KeywordMatchSetting' to a type 
definition for element 'settings'. 
</faultstring></soap:Fault></soap:Body></soap:Envelope>

Then if I remove that line from the XML file...

<soap:Envelope 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Header><ResponseHeader
 
xmlns="https://adwords.google.com/api/adwords/cm/v201506";><requestId>00051ff3c60626180abfa5415a00309c</requestId><serviceName>CampaignService</serviceName><methodName>mutate</methodName><operations>0</operations><responseTime>40</responseTime></ResponseHeader></soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>[AuthenticationError.OAUTH_TOKEN_INVALID
 
@ ; trigger:'&lt;null&gt;']</faultstring><detail><ApiExceptionFault 
xmlns="https://adwords.google.com/api/adwords/cm/v201506";><message>[AuthenticationError.OAUTH_TOKEN_INVALID
 
@ ; 
trigger:'&lt;null&gt;']</message><ApplicationException.Type>ApiException</ApplicationException.Type><errors
 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="AuthenticationError"><fieldPath></fieldPath><trigger>&lt;null&gt;</trigger><errorString>AuthenticationError.OAUTH_TOKEN_INVALID</errorString><ApiError.Type>AuthenticationError</ApiError.Type><reason>OAUTH_TOKEN_INVALID</reason></errors></ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>


I don't understand how the first example and I can still get it wrong?

Any pointers on how to solve is appreciated!

best,

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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-api@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=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/79b03b8d-85b0-4c9c-a2ad-723ff539af32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to