Hi, I'm not sure how the first one works, because both are missing an xsi:type attribute on the operand element (and targets elements) that indicate what the type is. Please adjust your code to ensure that the correct xsi types are added to the request.
Best, - Eric Koleda, AdWords API Team On Sep 9, 9:31 am, veseo <[email protected]> wrote: > Hi, I am developing a service that uses the Google Adwords API to > create and edit campaigns with their respective targetings. However, > when I try to send a campaign that has Geo Targetin that includes > Proximity Target(s), I get an error - "Unmarshalling Error: Unable to > create an instance of > com.google.ads.api.services.campaignmgmt.campaigntarget.v200909.jaxbgen.Tar > getList". > If I try to send cityTargets only, there are no problems. All tests > are made against production, not sandbox. I am attaching the request > xmls for both the working (no proximities) and non-working (proximity) > attempts: > > working (no proximities): > ---- > > <?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/cm/ > v201003" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP- > ENV:Header><ns1:RequestHeader > xsi:type="ns1:RequestHeader"><ns1:authToken>xxx</ > ns1:authToken><ns1:clientEmail>xxxx</ > ns1:clientEmail><ns1:developerToken>xxx</ > ns1:developerToken><ns1:userAgent>xxx</ns1:userAgent></ > ns1:RequestHeader></SOAP-ENV:Header><SOAP- > ENV:Body><ns1:mutate><ns1:operations><ns1:operator>SET</ > ns1:operator><ns1:operand><ns1:campaignId>57304533</ > ns1:campaignId><ns1:TargetList.Type>GeoTargetList</ > ns1:TargetList.Type><ns1:targets><ns1:excluded>false</ > ns1:excluded><ns1:cityName>Dusseldorf</ > ns1:cityName><ns1:countryCode>DE</ns1:countryCode></ns1:targets></ > ns1:operand></ns1:operations><ns1:operations><ns1:operator>SET</ > ns1:operator><ns1:operand><ns1:campaignId>57304533</ > ns1:campaignId><ns1:TargetList.Type>PlatformTargetList</ > ns1:TargetList.Type></ns1:operand></ns1:operations></ns1:mutate></SOAP- > ENV:Body></SOAP-ENV:Envelope> > > ---- > > non-working (one proximity and one city) > > <?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/cm/ > v201003" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP- > ENV:Header><ns1:RequestHeader > xsi:type="ns1:RequestHeader"><ns1:authToken>xxx</ > ns1:authToken><ns1:clientEmail>xxx</ > ns1:clientEmail><ns1:developerToken>xxx</ > ns1:developerToken><ns1:userAgent>xxx</ns1:userAgent></ > ns1:RequestHeader></SOAP-ENV:Header><SOAP- > ENV:Body><ns1:mutate><ns1:operations><ns1:operator>SET</ > ns1:operator><ns1:operand><ns1:campaignId>57304533</ > ns1:campaignId><ns1:TargetList.Type>GeoTargetList</ > ns1:TargetList.Type><ns1:targets><ns1:excluded>false</ > ns1:excluded><ns1:cityName>Dusseldorf</ > ns1:cityName><ns1:countryCode>DE</ns1:countryCode></ > ns1:targets><ns1:targets><ns1:excluded>false</ > ns1:excluded><ns1:geoPoint><ns1:latitudeInMicroDegrees>51224942</ > ns1:latitudeInMicroDegrees><ns1:longitudeInMicroDegrees>6775652</ > ns1:longitudeInMicroDegrees></ > ns1:geoPoint><ns1:radiusDistanceUnits>KILOMETERS</ > ns1:radiusDistanceUnits><ns1:radiusInUnits>25</ > ns1:radiusInUnits><ns1:address/><ns1:allowServiceOfAddress>false</ > ns1:allowServiceOfAddress></ns1:targets></ns1:operand></ > ns1:operations><ns1:operations><ns1:operator>SET</ > ns1:operator><ns1:operand><ns1:campaignId>57304533</ > ns1:campaignId><ns1:TargetList.Type>PlatformTargetList > </ns1:TargetList.Type></ns1:operand></ns1:operations></ns1: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
