Hi ,
  I tried to set LocationSearchParameter in targetingIdeaService, but 
unfortunately an error occurred and I don't know how to solve it.
Error: Exception'SoapFault' with message'Unmarshalling Error: cvc-type.2: 
The type definition cannot be abstract for element ns1:searchParameters.
soap:
<?xml version="1.0" encoding="utf-8"?>

<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/o/v201809 
"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201809";>
  <SOAP-ENV:Header>
    <ns1:RequestHeader>
      <ns2:clientCustomerId>917-615-4256</ns2:clientCustomerId>
      <ns2:developerToken>REDACTED</ns2:developerToken>
      <ns2:userAgent>unknown (AwApi-PHP, googleads-php-lib/40.0.0, 
PHP/5.6.40)</ns2:userAgent>
      <ns2:validateOnly>false</ns2:validateOnly>
      <ns2:partialFailure>false</ns2:partialFailure>
    </ns1:RequestHeader>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns1:get>
      <ns1:selector>
        <ns1:searchParameters xsi:type="ns1:RelatedToQuerySearchParameter">
          <ns1:queries>Call of Duty</ns1:queries>
          <ns1:queries>Mobile</ns1:queries>
        </ns1:searchParameters>
        <ns1:searchParameters xsi:type="ns1:LanguageSearchParameter">
          <ns1:languages>
            <ns2:id>1000</ns2:id>
          </ns1:languages>
        </ns1:searchParameters>
        <ns1:searchParameters/>
        <ns1:searchParameters xsi:type="ns1:NetworkSearchParameter">
          <ns1:networkSetting>
            <ns2:targetGoogleSearch>true</ns2:targetGoogleSearch>
            <ns2:targetSearchNetwork>false</ns2:targetSearchNetwork>
            <ns2:targetContentNetwork>false</ns2:targetContentNetwork>
            
<ns2:targetPartnerSearchNetwork>false</ns2:targetPartnerSearchNetwork>
          </ns1:networkSetting>
        </ns1:searchParameters>
        <ns1:ideaType>KEYWORD</ns1:ideaType>
        <ns1:requestType>STATS</ns1:requestType>
        
<ns1:requestedAttributeTypes>KEYWORD_TEXT</ns1:requestedAttributeTypes>
        
<ns1:requestedAttributeTypes>SEARCH_VOLUME</ns1:requestedAttributeTypes>
        
<ns1:requestedAttributeTypes>AVERAGE_CPC</ns1:requestedAttributeTypes>
        
<ns1:requestedAttributeTypes>COMPETITION</ns1:requestedAttributeTypes>
        
<ns1:requestedAttributeTypes>CATEGORY_PRODUCTS_AND_SERVICES</ns1:requestedAttributeTypes>
        
<ns1:requestedAttributeTypes>EXTRACTED_FROM_WEBPAGE</ns1:requestedAttributeTypes>
        
<ns1:requestedAttributeTypes>TARGETED_MONTHLY_SEARCHES</ns1:requestedAttributeTypes>
        <ns1:paging>
          <ns2:startIndex>0</ns2:startIndex>
          <ns2:numberResults>500</ns2:numberResults>
        </ns1:paging>
      </ns1:selector>
    </ns1:get>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
code:
        $locationParameter = new 
\Google\AdsApi\AdWords\v201806\o\LocationSearchParameter();
        $location = new \Google\AdsApi\AdWords\v201809\cm\Location();
        $location->setId(2643);
        $locationParameter->setLocations([$location]);
        $searchParameters[] = $locationParameter;
thank you for your help!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/7470ec8e-60a9-43f0-b720-50fff5c95ec7n%40googlegroups.com.

Reply via email to