Unmarshalling Error: cvc-type.2: The type definition cannot be abstract for element ns1:searchParameters.

76 views
Skip to first unread message

Sangeetha Jeyam

unread,
May 20, 2019, 6:28:26 AM5/20/19
to AdWords API and Google Ads API Forum
Hi,

I'm getting the "Unmarshalling Error: CVC-type.2: The type definition cannot be abstract for element v20:searchParameters."

when I tried to trigger this via dynamic script I'm facing this issue.

SOAP Request: 

   <soapenv:Header>
      <v20:RequestHeader>
         <!--Optional:-->
         <v201:clientCustomerId>${RequestHeader.clientCustomerId}</v201:clientCustomerId>
         <!--Optional:-->
         <v201:developerToken>${RequestHeader.developerToken}</v201:developerToken>
         <!--Optional:-->
         <v201:userAgent>${RequestHeader.userAgent}</v201:userAgent>
         <!--Optional:-->
         <v201:validateOnly>${RequestHeader.validateOnly}</v201:validateOnly>
         <!--Optional:-->
         <v201:partialFailure>${RequestHeader.partialFailure}</v201:partialFailure>
      </v20:RequestHeader>
   </soapenv:Header>
   <soapenv:Body>
      <v20:get>
         <!--Optional:-->
         <v20:selector>
            <!--Zero or more repetitions:-->
            <v20:searchParameters>
               <!--Optional:-->
               <v20:SearchParameter.Type>${searchParameters.SearchParameter.Type}</v20:SearchParameter.Type>
            </v20:searchParameters>
            <!--Optional:-->
            <v20:ideaType>${selector.ideaType}</v20:ideaType>
            <!--Optional:-->
            <v20:requestType>${selector.requestType}</v20:requestType>
            <!--Zero or more repetitions:-->
            <v20:requestedAttributeTypes>${selector.requestedAttributeTypes}</v20:requestedAttributeTypes>
            <!--Optional:-->
            <v20:paging>
               <!--Optional:-->
               <v201:startIndex>${paging.startIndex}</v201:startIndex>
               <!--Optional:-->
               <v201:numberResults>${paging.numberResults}</v201:numberResults>
            </v20:paging>
            <!--Optional:-->
            <v20:localeCode>${selector.localeCode}</v20:localeCode>
            <!--Optional:-->
            <v20:currencyCode>${selector.currencyCode}</v20:currencyCode>
         </v20:selector>
      </v20:get>
   </soapenv:Body>
</soapenv:Envelope>

Kindly advise me how to fix this issue.

Google Ads API Forum Advisor Prod

unread,
May 20, 2019, 1:15:03 PM5/20/19
to adwor...@googlegroups.com
Hello Sangeetha, 

It looks like the error is specific to the SearchParameter type that you're using. The sample Search Parameter SOAP logs from PHP client library are below: 

<ns1:searchParameters xsi:type="ns1:RelatedToQuerySearchParameter">
<ns1:queries>bakery</ns1:queries>
<ns1:queries>pastries</ns1:queries>
<ns1:queries>birthday cake</ns1:queries>
</ns1:searchParameters>

Could you please refer to our code sample as a reference? Let me know if you have any questions.

Regards,
Bharani, Google Ads API Team

ref:_00D1U1174p._5001UAq8Dj:ref

Sangeetha Jeyam

unread,
May 21, 2019, 6:04:02 AM5/21/19
to AdWords API and Google Ads API Forum
Hi Bharani,

Thanks for the reply.
My issue got fixed.

updated my schema as below now it's working as I expected.

 <v20:searchParameters xsi:type="v20:RelatedToQuerySearchParameter">
         <v20:SearchParameter.Type>${searchParameters.SearchParameter.Type}</v20:SearchParameter.Type>
<v20:queries>${seedKey}</v20:queries>
 </v20:searchParameters>
Reply all
Reply to author
Forward
0 new messages