- Subscribe to RSS Feed
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
SOAP - escaping characters ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Flag for a Moderator
03-01-2010 05:11 PM
Hi, In experimenting with the SOAP api, I have a general question about SOAP that I ran into when using the query language (ZOQL).
Are SOAP messages supposed to be HTML-escaped ?
For example, the SOAP library i'm using for Ruby (soap4r) seems to be escaping all my XML text.
Thus some comparison operators such as >, <, and apostrophes (') will be escaped to their respective HTML escape sequences (ie. > < &apos
.
What results is that I'm not able to send properly formatted requests in ZOQL.
I'm not an XML expert, so please correct me if I am wrong, but here's another page on XML-escaping:
http://www.rtslink.com/introductionxmlsoap.html
This seems to say that the SOAP requests should indeed be html-escaped for these special characteres.
If my ZOQL query is:
"select id from Account where AccountNumber='123'" it is currently being sent to Zuora as:
"select id from Account where AccountNumber='123'"
Of course, this does not return the proper result.
Any suggestions?
Thanks !
Solved! Go to Solution.
Re: SOAP - escaping characters ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Flag for a Moderator
03-01-2010 05:19 PM
I'm also using Ruby. I've chosen Savon. My query method is below.
def query(query_string)
@client.query do |soap|
soap.header = { "wsdl:SessionHeader" => {"wsdl:session" => @session_id } }
soap.body = { "wsdl:queryString" => query_string }
end
endIt works fine for me.
Re: SOAP - escaping characters ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Flag for a Moderator
03-01-2010 05:43 PM
Thanks for the quick reply. I found that it was another error that led me to this query error.
In the end, my HTML-escaped queries were being processed just fine.
The HTML-escaped entities are parsed and interpreted as they should be.
