BatchJobService mutateResponse says it uses v201603 but the response seems to be v201509

108 views
Skip to first unread message

Carl-Johan Kjellander

unread,
May 31, 2016, 11:21:43 AM5/31/16
to AdWords API Forum
I am doing a new integration to the v201603 API and implementing what we need for the BatchJobService.

However, I made a mistake and downloaded the mutateResponse and started trying to parse the XML but our parser only spat out errors, specifically on errorString.

This is the message I got from google:

"<?xml version=\"1.0\" encoding=\"UTF-8\"?><mutateResponse xmlns=\"https://adwords.google.com/api/adwords/cm/v201603\"><rval><errorList><errors xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"BudgetError\"><fieldPath>operations[0].operand.budget.budgetId</fieldPath><trigger></trigger><errorString>BudgetError.BUDGET_DELETED</errorString><ApiError.Type>BudgetError</ApiError.Type><reason>BUDGET_REMOVED</reason></errors><errors xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"RequiredError\"><fieldPath>operations[0].operand.biddingStrategyConfiguration.biddingStrategyType</fieldPath><trigger></trigger><errorString>RequiredError.REQUIRED</errorString><ApiError.Type>RequiredError</ApiError.Type><reason>REQUIRED</reason></errors></errorList><index>0</index></rval></mutateResponse>"

I find it weird that errorString comes after trigger, cause when you look at the XSD for v201603 this is the relevant part:

  <xs:complexType abstract="true" name="ApiError">
    <xs:sequence>
      <xs:element minOccurs="0" name="ApiError.Type" type="xs:string"/>
      <xs:element minOccurs="0" name="errorString" type="xs:string"/>
      <xs:element minOccurs="0" name="fieldPath" type="xs:string"/>
      <xs:element minOccurs="0" name="trigger" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>

ApiError.Type and errorString should be before fieldPath and trigger.

So I looked at diffs with older XSDs and this is the relevant part in v201509:

  <xs:complexType abstract="true" name="ApiError">
    <xs:sequence>
      <xs:element minOccurs="0" name="fieldPath" type="xs:string"/>
      <xs:element minOccurs="0" name="trigger" type="xs:string"/>
      <xs:element minOccurs="0" name="errorString" type="xs:string"/>
      <xs:element minOccurs="0" name="ApiError.Type" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>

So it looks like the response is actually v201509 formatted somehow.

Any ideas why?

/cjk

Joyce Lava

unread,
May 31, 2016, 1:48:30 PM5/31/16
to AdWords API Forum
Hi Cal-Johan,

I am not sure on where did you find the XSD for v201603, but upon checking on the BatchJobService wsdl, it shows the part:

<complexType abstract="true" name="ApiError">

<annotation>

<documentation>

The API error base class that provides details about an error that occurred while processing a service request. <p>The OGNL field path is provided for parsers to identify the request data element that may have caused the error.</p>

</documentation>

</annotation>

<sequence>

<element maxOccurs="1" minOccurs="0" name="fieldPath" type="xsd:string">

<annotation>

<documentation>The OGNL field path to identify cause of error.</documentation>

</annotation>

</element>

<element maxOccurs="1" minOccurs="0" name="trigger" type="xsd:string">

<annotation>

<documentation>The data that caused the error.</documentation>

</annotation>

</element>

<element maxOccurs="1" minOccurs="0" name="errorString" type="xsd:string">

<annotation>

<documentation>

A simple string representation of the error and reason.

</documentation>

</annotation>

</element>

<element maxOccurs="1" minOccurs="0" name="ApiError.Type" type="xsd:string">

<annotation>

<documentation>

Indicates that this instance is a subtype of ApiError. Although this field is returned in the response, it is ignored on input and cannot be selected. Specify xsi:type instead.

</documentation>

</annotation>

</element>

</sequence>

</complexType>

If you have other concerns regarding the above, please send the SOAP request and response by clicking Reply Privately to Author.

Best Regards,
Joyce, AdWords API Team

Carl-Johan Kjellander

unread,
May 31, 2016, 8:51:54 PM5/31/16
to AdWords API Forum
I found it here:

https://adwords.google.com/api/adwords/cm/xsd/v201603/BatchJobOps.xsd

The v201509 version of that xsd was linked from a migration guide that we followed.

I suggest doing a diff between the xsd above and this one:

https://adwords.google.com/api/adwords/cm/xsd/v201509/BatchJobOps.xsd

All will become much more clear as you can see that the parameters have switched places.

Also, we are using soap to get the temporary upload urls, but this response is the raw xml fetched via http, so we are using the xsd to validate and parse the xml coming back, and not the wsdl.

/cjk

Carl-Johan Kjellander

unread,
Jun 1, 2016, 3:34:52 AM6/1/16
to AdWords API Forum
https://developers.google.com/adwords/api/docs/guides/batch-jobs#supported_operations is where we found the links btw. At the time I started messing with it it was v201603 and v201605, but the same problem applies to the latter xsd, it has moved around the fields in ApiError.

Carl-Johan Kjellander

unread,
Jun 2, 2016, 7:37:34 PM6/2/16
to AdWords API Forum
We verified today that sending XML using the BatchJobOps.xsd works, the none of the replies actually validates. All the new xsds from v201601 and onward has everything sorted alphabetically instead of using the old structure that has evolved over time adding stuff to the end of every sequence. And a sequence is a sequence, you can't change the order.

Carl-Johan Kjellander

unread,
Jun 3, 2016, 11:05:44 AM6/3/16
to AdWords API Forum
How is it going? Haven't heard from any of you for a few days. Have your tried diffing the v201509 and later XSDs?

Joyce Lava

unread,
Jun 3, 2016, 11:35:18 AM6/3/16
to AdWords API Forum
Hi Carl-Johan,

Sorry for the delayed response. The engineering team is working on this issue. We will let you know about any updates once available.

Thanks and Regards,
Joyce, AdWords API Team

Carl-Johan Kjellander

unread,
Jun 3, 2016, 1:26:42 PM6/3/16
to AdWords API Forum
Excellent to hear! But given that the sunset for v201509 is in a few weeks, I think I have to implement a simple xml-parser that doesn't validate what we receive just so we can move up to v201603 before the deadline.

Any hints on which direction you are leaning toward for a fix would be much appreciated.

Joyce Lava

unread,
Jun 3, 2016, 2:13:20 PM6/3/16
to AdWords API Forum
Hi Carl-Johan,

The engineering team is looking into the issue. If there is any update, we will inform you as soon as possible.

Carl-Johan Kjellander

unread,
Jun 8, 2016, 8:37:31 AM6/8/16
to AdWords API Forum
Any updates? Can the engineering team confirm the problems we have been having?

/cjk

Joyce Lava

unread,
Jun 8, 2016, 9:28:07 PM6/8/16
to AdWords API Forum
Hi Carl-Johan,

The engineering team is actively investigating on the issue. Let me check with them about any updates they can provide as of the moment.

Thanks and Regards,
Joyce, AdWords API Team

Joyce Lava

unread,
Jun 9, 2016, 12:58:43 AM6/9/16
to AdWords API Forum
Hi Carl-Johan,

As of the moment, there is no news yet. But I assure that will let you know as soon as possible if there is any update. Will try to check on them again by Friday.

Carl-Johan Kjellander

unread,
Jun 13, 2016, 7:11:05 AM6/13/16
to AdWords API Forum
No news yet?

Shwetha Vastrad (AdWords API Team)

unread,
Jun 13, 2016, 12:54:48 PM6/13/16
to AdWords API Forum
Hi Carl-Johan,

The engineering team is still investigating the issue. We don't have an update at the moment. You could try to generate the code using this schema for now as an alternative to BatchJobOps.xsd. Let me know if this fixes the issue for now. 

Regards,
Shwetha, AdWords API Team.
Message has been deleted

Shwetha Vastrad (AdWords API Team)

unread,
Jul 29, 2016, 5:34:35 PM7/29/16
to AdWords API Forum
Hi Carl-Johan,

This issue has been fixed in API version v201607. The BatchJobOps.xsd has been removed. Please use BatchJobOpsService.wsdl instead to retrieve the schema for batch job uploads. Please see the release notes of the latest API version v201607.
Reply all
Reply to author
Forward
0 new messages