Ampersands (&) breaking SOAP message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2011 09:56 AM
Hi All,
I am using soap messaging to send tickets from instance to instance. The problem I am running into is that ampersands are breaking the soap message. When an "&" is in the message in any text field, the message will not be sent. I am opening a ticket with HI but am curious to see if anyone has a work around or some sort of scripting fix for this.
Thanks
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2011 10:18 AM
Have you tried either escaping the ampersand using HTML codes, or wrapping the contents of each tag with CDATA statements?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2011 11:06 AM
No I have not.
Can we do this in a business rule?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2011 12:56 PM
You can do escaping or CDATA wrapping in whatever script is posting the SOAP message (typically a business rule).
If you go the CDATA route, then you could also add the CDATA in your SOAP Message template for each of the concerned tags instead of scripting it in.
A sample SOAP Message template could look like this if you do put the CDATA right into the template:
[code lang='xml']
<__encoded_query xsi:type="xsd:string">${encoded_query}<br/>
</__encoded_query>
[/code]
