CONCRETE_TYPE_REQUIRED

100 views
Skip to first unread message

Emre Akkuş

unread,
Oct 21, 2014, 3:44:30 PM10/21/14
to adwor...@googlegroups.com
Hi Josh,
Thanks For your reply. I've tried them already.

MUTATE REQUEST:

   <soapenv:Header>
      <v20:RequestHeader>
         <v20:clientCustomerId>***-***-****</v20:clientCustomerId>
         <v20:developerToken>**************</v20:developerToken>
         <v20:userAgent>Test</v20:userAgent>
         <v20:validateOnly>false</v20:validateOnly>
         <v20:partialFailure>false</v20:partialFailure>
      </v20:RequestHeader>
   </soapenv:Header>
   <soapenv:Body>
      <v20:mutate>
         <v20:operations>
            <v20:operator>SET</v20:operator>
            <v20:operand xsi:type="BiddableAdGroupCriterion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
               <v20:adGroupId>15437588649</v20:adGroupId>
               <v20:criterion>
                  <v20:id>86870128449</v20:id>
               </v20:criterion>
               <v20:AdGroupCriterion.Type>BiddableAdGroupCriterion</v20:AdGroupCriterion.Type>
            </v20:operand>
         </v20:operations>
      </v20:mutate>
   </soapenv:Body>
</soapenv:Envelope>



<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 'BiddableAdGroupCriterion' to a type definition for element 'v20:operand'.</faultstring>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>




And about not setting anything, I think i should take different error about not setting anything. I'm trying to solve concrete type error first then will try to change userStatus and biddingStrategyConfiguration. Like this:

   <soapenv:Header>
      <v20:RequestHeader>
         <v20:clientCustomerId>********</v20:clientCustomerId>
         <v20:developerToken>************</v20:developerToken>
         <v20:userAgent>Test</v20:userAgent>
         <v20:validateOnly>false</v20:validateOnly>
         <v20:partialFailure>false</v20:partialFailure>
      </v20:RequestHeader>
   </soapenv:Header>
   <soapenv:Body>
      <v20:mutate>
         <v20:operations>
            <v20:operator>SET</v20:operator>
            <v20:operand xsi:type="BiddableAdGroupCriterion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
               <v20:adGroupId>15437588649</v20:adGroupId>
               <v20:criterion>
                  <v20:id>86870128449</v20:id>
               </v20:criterion>
               <v20:AdGroupCriterion.Type>BiddableAdGroupCriterion</v20:AdGroupCriterion.Type>
             <v20:userStatus>ENABLED</v20:userStatus>
            </v20:operand>
         </v20:operations>
      </v20:mutate>
   </soapenv:Body>
</soapenv:Envelope>



<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Client</faultcode>
         <faultstring>Unmarshalling Error: cvc-complex-type.2.4.d: Invalid content was found starting with element 'v20:userStatus'. No child element is expected at this point.</faultstring>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>


I'm making this requests from Salesforce platform. So neither Java nor Php Client Libraries are not exact match for me. I parsed the wsdl file of AdGroupCriterionService to .cls and trying to use that.

Thanks.

Emre

Josh Radcliff (AdWords API Team)

unread,
Oct 21, 2014, 4:20:43 PM10/21/14
to adwor...@googlegroups.com
Hi Emre,

The only thing you're missing is the namespace for the xsi type. The following request just worked for me.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
   <soapenv:Header>
      <v20:RequestHeader>
         <v20:clientCustomerId>***</v20:clientCustomerId>
         <v20:developerToken>***</v20:developerToken>
         <v20:userAgent>***</v20:userAgent>
         <v20:validateOnly>false</v20:validateOnly>
         <v20:partialFailure>false</v20:partialFailure>
      </v20:RequestHeader>
   </soapenv:Header>
   <soapenv:Body>
      <v20:mutate>
         <v20:operations>
            <v20:operator>SET</v20:operator>
            <v20:operand xsi:type="v20:BiddableAdGroupCriterion"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
               <v20:adGroupId>10799196074</v20:adGroupId>
               <v20:criterion>
                  <v20:id>10286321</v20:id>
               </v20:criterion>
            </v20:operand>
         </v20:operations>
      </v20:mutate>
   </soapenv:Body>
</soapenv:Envelope>

Cheers,
Josh, AdWords API Team

Emre Akkuş

unread,
Oct 23, 2014, 7:48:44 AM10/23/14
to adwor...@googlegroups.com
Thanks Josh. You helped me a lot!
Reply all
Reply to author
Forward
0 new messages