Hi,
  It's possible the perl library logs slightly different XML than what is 
being sent to the server - we have that problem in python due to a bad XML 
library we're stuck with.

In any case, I think the problem is that your tag name is campaignId but it 
should be Id: 
https://developers.google.com/adwords/api/docs/reference/latest/CampaignService.Campaign#id

- Kevin Winter
AdWords API Team

On Monday, February 4, 2013 11:50:57 PM UTC-5, Noah wrote:
>
> Hello,
>
> I'm working on sending direct SOAP requests to the adwords API using Perl 
> and Curl.  For the most part, it is working fine, but I came across a 
> rather strange inconsistency.
>
> I've had trouble adding an ad group to an existing campaign.  So, as a 
> diagnostic step, I used the Perl client to add an ad group with full 
> logging turned on.  This worked fine - the group was added and the SOAP XML 
> was in the log file.  I then used the SOAP XML generated in the log file 
> for my direct request (using Perl and curl.)  Google responds with the 
> following error:
>
> <faultstring>Unmarshalling Error: cvc-complex-type.2.4.a: Invalid content 
> was found starting with element 'campaignId'....
>
> This seems odd.  Since I'm passing the EXACT same SOAP from the log file 
> to the API, it should work.  
>
> The SOAP XML is below (Campaign ID sanitized.)
>
> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
> ><SOAP-ENV:Header><RequestHeader xmlns="
> https://adwords.google.com/api/adwords/cm/v201209";><clientCustomerId 
> xmlns="https://adwords.google.com/api/adwords/cm/v201209";>741-128-1965</clientCustomerId><developerToken
>  
> xmlns="https://adwords.google.com/api/adwords/cm/v201209";>REDACTED</developerToken><userAgent
>  
> xmlns="https://adwords.google.com/api/adwords/cm/v201209";>Smart Media 
> Corporation Client (AwApi-Perl/2.7.5, Common-Perl/2.0.0, SOAP-WSDL/2.00.10, 
> libwww-perl/6.04, perl/5.012004)</userAgent><validateOnly xmlns="
> https://adwords.google.com/api/adwords/cm/v201209";>false</validateOnly><partialFailure
>  
> xmlns="https://adwords.google.com/api/adwords/cm/v201209";>false</partialFailure></RequestHeader></SOAP-ENV:Header><SOAP-ENV:Body><mutate
>  
> xmlns="https://adwords.google.com/api/adwords/cm/v201209";><operations><operator>ADD</operator><operand><campaignId>999999</campaignId><name>Earth
>  
> to Mars Cruises #BQbs7qEhEEIk</name><status>ENABLED</status><settings 
> xsi:type="TargetingSetting" 
> ><details><criterionTypeGroup>PLACEMENT</criterionTypeGroup><targetAll>true</targetAll></details><details><criterionTypeGroup>VERTICAL</criterionTypeGroup><targetAll>false</targetAll></details></settings><bids
> > 
> xsi:type="ManualCPCAdGroupBids" 
> ><keywordMaxCpc><amount><microAmount>1000000</microAmount></amount></keywordMaxCpc></bids></operand></operations><operations><operator>ADD</operator><operand><campaignId>129159518</campaignId><name>Earth
> > 
> to Mars Cruises #CX1J8eCUpF0g</name><status>ENABLED</status><settings 
> xsi:type="TargetingSetting" 
> ><details><criterionTypeGroup>PLACEMENT</criterionTypeGroup><targetAll>true</targetAll></details><details><criterionTypeGroup>VERTICAL</criterionTypeGroup><targetAll>false</targetAll></details></settings><bids
> > 
> xsi:type="ManualCPCAdGroupBids" 
> ><keywordMaxCpc><amount><microAmount>1000000</microAmount></amount></keywordMaxCpc></bids></operand></operations></mutate></SOAP-ENV:Body></SOAP-ENV:Envelope>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to