Happy Business Starts Here

SOAP API query with < filter returns Error: Unexpected subelement querystring

Highlighted
Community Manager

SOAP API query with < filter returns Error: Unexpected subelement querystring

See Reply



Subscribe to Zuora System Updates at Zuora Trust
Follow Zuora Global Support on Twitter and LinkedIn

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: SOAP API query with < filter returns Error: Unexpected subelement querystring

Question or Problem Statement:
I’m having trouble applying multiple <>= filter conditions within my SOAP API integration which produces an “Unexpected subelement querystring” in the SOAP API response from my request.  I suspect it’s due to XML formatting.  What are the escape equivalents to these dateTime filters?

Solution:
This is most often associated with use of the < or <= in a SOAP query, but here's the full list of the replacement values

&gt;      greater than
&gt;=    greater than or equal to
&lt;       less than
&lt;=     less than or equal to

Example:

<ns1:query>
      <ns1:queryString>Select Id From RatePlanCharge where EffectiveStartDate &lt; '2014-05-31T00:00:00.000'</ns1:queryString>
</ns1:query>


Supporting References:

http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references



Subscribe to Zuora System Updates at Zuora Trust
Follow Zuora Global Support on Twitter and LinkedIn

View solution in original post

1 REPLY 1
Highlighted
Community Manager

Re: SOAP API query with < filter returns Error: Unexpected subelement querystring

Question or Problem Statement:
I’m having trouble applying multiple <>= filter conditions within my SOAP API integration which produces an “Unexpected subelement querystring” in the SOAP API response from my request.  I suspect it’s due to XML formatting.  What are the escape equivalents to these dateTime filters?

Solution:
This is most often associated with use of the < or <= in a SOAP query, but here's the full list of the replacement values

&gt;      greater than
&gt;=    greater than or equal to
&lt;       less than
&lt;=     less than or equal to

Example:

<ns1:query>
      <ns1:queryString>Select Id From RatePlanCharge where EffectiveStartDate &lt; '2014-05-31T00:00:00.000'</ns1:queryString>
</ns1:query>


Supporting References:

http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references



Subscribe to Zuora System Updates at Zuora Trust
Follow Zuora Global Support on Twitter and LinkedIn

View solution in original post