Microsoft Developer Network >
Forums Home
>
Windows Live Developer Forums Forums
>
Microsoft adCenter: Development
>
Change of AdGroupIds from type int to type long error
Change of AdGroupIds from type int to type long error
- Hello. I am trying like crazy to get this to work an nothing I am trying is working. Here is my SOAP request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<h:ApplicationToken xmlns:h="https://adcenter.microsoft.com/v6"></h:ApplicationToken>
<h:CustomerAccountId xmlns:h="https://adcenter.microsoft.com/v6">XXXX</h:CustomerAccountId>
<h:CustomerId xmlns:h="https://adcenter.microsoft.com/v6">XXXXX</h:CustomerId>
<h:DeveloperToken xmlns:h="https://adcenter.microsoft.com/v6">XXXX</h:DeveloperToken>
<h:Password xmlns:h="https://adcenter.microsoft.com/v6">XXXX</h:Password>
<h:UserName xmlns:h="https://adcenter.microsoft.com/v6">XXXX</h:UserName>
</soapenv:Header>
<soapenv:Body>
<PauseAdGroupsRequest xmlns="https://adcenter.microsoft.com/v6">
<CampaignId>0000</CampaignId>
<AdGroupIds>
<ns6 xmlns:ns6="http://schemas.microsoft.com/2003/10/Serialization/Arrays">0000</ns6>
</AdGroupIds>
</PauseAdGroupsRequest>
</soapenv:Body>
</soapenv:Envelope>
The error seems to be with the line <ns6 xmlns:ns6="http://schemas.microsoft.com/2003/10/Serialization/Arrays">0000</ns6>
This line used to look like this with version 5.1: <ns6:int xmlns:ns6="http://schemas.microsoft.com/2003/10/Serialization/Arrays">450078499</ns6:int> and this worked.
Here is the error I'm getting: There was an error deserializing the object of type System.Int64[]. End element 'AdGroupIds' from namespace 'https://adcenter.microsoft.com/v6' expected. Found element 'ns6' from namespace 'https://adcenter.microsoft.com/v6'
I can't seem to get anything to work and any help would be appreciated. Thank you!
Answers
- Hi Dustin,
Here's how the body of the request should look like:
<s:Body>
<PauseAdGroupsRequest xmlns="https://adcenter.microsoft.com/v6">
<CampaignId>XXXXX</CampaignId>
<AdGroupIds xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:long>XXXXX</a:long>
</AdGroupIds>
</PauseAdGroupsRequest>
</s:Body>
Let us know if this doesn't resolve the error.
Mirena Chausheva, Technical Support Engineer, Microsoft adCenter- Marked As Answer byDustin Richardson Thursday, October 29, 2009 2:16 PM
- Proposed As Answer byMirena Chausheva - Microsoft Wednesday, October 28, 2009 7:08 PM
- I believe the SOAPAction should just be PauseAdGroups
Jeff Dillon, API Support- Marked As Answer byDustin Richardson Thursday, October 29, 2009 2:16 PM
All Replies
- Please open a support ticket, and we would be happy to assist.
Jeff Dillon, API Support - Hi Dustin,
Here's how the body of the request should look like:
<s:Body>
<PauseAdGroupsRequest xmlns="https://adcenter.microsoft.com/v6">
<CampaignId>XXXXX</CampaignId>
<AdGroupIds xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:long>XXXXX</a:long>
</AdGroupIds>
</PauseAdGroupsRequest>
</s:Body>
Let us know if this doesn't resolve the error.
Mirena Chausheva, Technical Support Engineer, Microsoft adCenter- Marked As Answer byDustin Richardson Thursday, October 29, 2009 2:16 PM
- Proposed As Answer byMirena Chausheva - Microsoft Wednesday, October 28, 2009 7:08 PM
- Thank you so much Mirena! I think that did the trick, but now I'm getting another error I've never seen before. I hope I can post that here too. Thank you so much for the help. I've been working on this forever it seems and I feel like I'm very close to getting version 6 up and running. I'll post the XML again:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<h:ApplicationToken xmlns:h="https://adcenter.microsoft.com/v6"></h:ApplicationToken>
<h:CustomerAccountId xmlns:h="https://adcenter.microsoft.com/v6">XXXX</h:CustomerAccountId>
<h:CustomerId xmlns:h="https://adcenter.microsoft.com/v6">XXXXX</h:CustomerId>
<h:DeveloperToken xmlns:h="https://adcenter.microsoft.com/v6">XXXX</h:DeveloperToken>
<h:Password xmlns:h="https://adcenter.microsoft.com/v6">XXXX</h:Password>
<h:UserName xmlns:h="https://adcenter.microsoft.com/v6">XXXX</h:UserName>
</soapenv:Header>
<soapenv:Body>
<PauseAdGroupsRequest xmlns="https://adcenter.microsoft.com/v6">
<CampaignId>0000</CampaignId>
<AdGroupIds xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:long>00000</a:long>
</AdGroupIds>
</PauseAdGroupsRequest>
</soapenv:Body>
</soapenv:Envelope>
Now I'm getting this error:
The message with Action 'PauseAdGroupsRequest' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
I have a feeling this might have to do with how I'm submitting the request to the web service. I am using ColdFusion (I'll wait for the laughter to die down before I continue). Here is the code I'm using, I think you will see what it is I am trying to do:
<cfhttp url="https://adcenterapi.microsoft.com/Api/Advertiser/V6/CampaignManagement/CampaignManagementService.svc?wsdl" method="post">
<cfhttpparam name="SOAPAction" type="header" value="PauseAdGroupsRequest"/>
<cfhttpparam type="xml" value="#variable_that_holds_xml#">
</cfhttp>
I used this exact same setup for version 5 with the version 5 url in there but something seems to have changed. If someone can spot what I'm doing wrong, I would greatly appreciate it. Thank you! - I believe the SOAPAction should just be PauseAdGroups
Jeff Dillon, API Support- Marked As Answer byDustin Richardson Thursday, October 29, 2009 2:16 PM
- That did the trick. Thank you VERY much, Jeff!
- Proposed As Answer byJeff Dillon - MSFT Tuesday, November 10, 2009 5:29 PM

