Hi Jagad MCC,

Simply changing the namespace will not suffice, since the *RequestHeader *still 
needs to be from the *mcm* namespace, while other elements are from the *cm* 
namespace. 
You'll need to use the WSDL for each service to find the proper namespace 
for each element (e.g., ManagedCustomerService wsdl 
<https://adwords.google.com/api/adwords/mcm/v201502/ManagedCustomerService?wsdl>
).

Another, *far* easier option would be to use one of our client libraries 
<https://developers.google.com/adwords/api/docs/clientlibraries>. The 
client libraries save you from manually generating SOAP XML, so you won't 
have to deal with all of the minutiae of constructing messages and can 
simply focus on working with objects.

Thanks,
Josh, AdWords API Team

On Friday, May 15, 2015 at 1:12:15 PM UTC-4, Jagad MCC wrote:
>
> Hi Josh, thankyou for response,
>
> I got this error when change 
> https://adwords.google.com/api/adwords/*mcm*/v201502 
> to https://adwords.google.com/api/adwords/*cm*/v201502 for the SOAP 
> header elements.
>
> $ curl \
> > --header "Content-Type: application/soap+xml" \
> > --header "Authorization : Bearer Xxxx.xxxxxxxxxxxxxx_
> 1234567890abcdefghijklmnopqrstuvwxyz" \
> > --data @cs_get.wsdl \
> > https://adwords.google.com/api/adwords/mcm/v201502/CustomerService
> result: 
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
> ><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Unmarshalling
> > 
> Error: unexpected element (uri:"
> https://adwords.google.com/api/adwords/cm/v201502";, 
> local:"RequestHeader"). Expected elements are &lt;{
> https://adwords.google.com/api/adwords/mcm/v201502}ApiExceptionFault&gt
> ;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}RequestHeader&gt
> ;,&lt;{
> https://adwords.google.com/api/adwords/mcm/v201502}ResponseHeader&gt
> ;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}get&gt;,&lt;{
> https://adwords.google.com/api/adwords/mcm/v201502}getResponse&gt;,&lt;{
> https://adwords.google.com/api/adwords/mcm/v201502}mutate&gt;,&lt;{
> https://adwords.google.com/api/adwords/mcm/v201502}mutateResponse&gt; 
> </faultstring></soap:Fault></soap:Body></soap:Envelope>
>
> Same result for ManagedCustomerService :
> $ curl \
> > --header "Content-Type: application/soap+xml" \
> > --header "Authorization : Bearer Xxxx.xxxxxxxxxxxxxx_
> 1234567890abcdefghijklmnopqrstuvwxyz" \
> > --data @mcs_get.wsdl \
> > https://
> adwords.google.com/api/adwords/mcm/v201502/ManagedCustomerService
> result:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
> ><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Unmarshalling
> > 
> Error: unexpected element (uri:"
> https://adwords.google.com/api/adwords/cm/v201502";, 
> local:"RequestHeader"). Expected elements are &lt;{
> https://adwords.google.com/api/adwords/mcm/v201502}ApiExceptionFault&gt
> ;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}RequestHeader&gt
> ;,&lt;{
> https://adwords.google.com/api/adwords/mcm/v201502}ResponseHeader&gt
> ;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}get&gt;,&lt;{
> https://adwords.google.com/api/adwords/mcm/v201502}getPendingInvitations&gt
> ;,&lt;{
> https://adwords.google.com/api/adwords/mcm/v201502}getPendingInvitationsResponse&gt
> ;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}getResponse&gt
> ;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}mutate&gt;,&lt;{
> https://adwords.google.com/api/adwords/mcm/v201502}mutateLabel&gt;,&lt;{
> https://adwords.google.com/api/adwords/mcm/v201502}mutateLabelResponse&gt
> ;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}mutateLink&gt
> ;,&lt;{
> https://adwords.google.com/api/adwords/mcm/v201502}mutateLinkResponse&gt
> ;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}mutateManager&gt
> ;,&lt;{
> https://adwords.google.com/api/adwords/mcm/v201502}mutateManagerResponse&gt
> ;,&lt;{
> https://adwords.google.com/api/adwords/mcm/v201502}mutateResponse&gt; 
> </faultstring></soap:Fault></soap:Body></soap:Envelope>
>
> Updated wsdl file attached. 
>
>
> On Friday, May 15, 2015 at 9:36:12 PM UTC+7, Josh Radcliff (AdWords API 
> Team) wrote:
>>
>> Hi AF,
>>
>> The reason that your requests for *ManagedCustomerService* and 
>> *CustomerService* are failing is that you are not using the correct XML 
>> namespace for the *clientCustomerId* and *developerToken* elements in 
>> those requests. You're specifying the namespace of:
>>
>> https://adwords.google.com/api/adwords/*mcm*/v201502
>>
>> but those elements belong to namespace:
>>
>> https://adwords.google.com/api/adwords/*cm*/v201502
>>
>> Please use the correct namespace for the SOAP header elements and let me 
>> know if you still encounter issues.
>>
>> Thanks,
>> Josh, AdWords API Team
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/e0cf4b6f-afa0-4c6b-aa29-6fba2c555349%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to