I'm trying to send XML based Adwords API request to CampaignService.
I have tried the following formats for requesting Campaign Id and Campaign Name selector fields, but it is giving me INVALID_FIELD_NAME error.
Formats tried : 'Id','Name' ; [Id,Name] ; ['Id','Name'] ---- All raising same error.
both Id and Name are valid fields for the CampaignService.
Can any help me with what should be the format in which these selector formats should be passed on?
I attach the XML request body and Error below
<soapenv:Header>
<v20:RequestHeader>
<!--Optional:-->
<v201:clientCustomerId>767-***-9100</v201:clientCustomerId>
<!--Optional:-->
<v201:developerToken>c********nitijDtDzSklQ</v201:developerToken>
<!--Optional:-->
<v201:userAgent>SoapUI</v201:userAgent>
<!--Optional:-->
<v201:validateOnly>true</v201:validateOnly>
<!--Optional:-->
<v201:partialFailure>false</v201:partialFailure>
</v20:RequestHeader>
</soapenv:Header>
<soapenv:Body>
<v20:get>
<!--Optional:-->
<v20:serviceSelector>
<!--Zero or more repetitions:-->
<v201:fields>[Id,Name]</v201:fields>
<!--Zero or more repetitions:-->
<v201:predicates>
<!--Optional:-->
<v201:field>StartDate</v201:field>
<!--Optional:-->
<v201:operator>GREATER_THAN_EQUALS</v201:operator>
<!--Zero or more repetitions:-->
<v201:values>20200101</v201:values>
</v201:predicates>
<!--Optional:-->
<v201:dateRange>
<!--Optional:-->
<v201:min>20200101</v201:min>
<!--Optional:-->
<v201:max>20210131</v201:max>
</v201:dateRange>
<!--Zero or more repetitions:-->
<v201:ordering>
<!--Optional:-->
<v201:field>StartDate</v201:field>
<!--Optional:-->
<v201:sortOrder>ASCENDING</v201:sortOrder>
</v201:ordering>
<!--Optional:-->
<v201:paging>
<!--Optional:-->
<v201:startIndex>0</v201:startIndex>
<!--Optional:-->
<v201:numberResults>3</v201:numberResults>
</v201:paging>
</v20:serviceSelector>
</v20:get>
</soapenv:Body>
</soapenv:Envelope>
Error Msg:
The remote server returned an error: (500) Internal Server Error.
Status Code: InternalServerError
Response Body: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809"><requestId>0005baf675ca44de0a62e20866020df5</requestId><serviceName>CampaignService</serviceName><methodName>get</methodName><operations>0</operations><responseTime>149</responseTime></ResponseHeader></soap:Header><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>[SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'[Id,Name]']</faultstring><detail><ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201809"><message>[SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'[Id,Name]']</message><ApplicationException.Type>ApiException</ApplicationException.Type><errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SelectorError"><fieldPath>serviceSelector</fieldPath><fieldPathElements><field>serviceSelector</field></fieldPathElements><trigger>[Id,Name]</trigger><errorString>SelectorError.INVALID_FIELD_NAME</errorString><ApiError.Type>SelectorError</ApiError.Type><reason>INVALID_FIELD_NAME</reason></errors></ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>
Much appreciate your help on this.