Re: JAXRPC - "string" as return params - escape chars problem

From: Steve W. Jackson <>
Date: Thu, 2 Dec 2004 12:54:59 -0600

On Dec 1, 2004, at 10:20 PM, wrote:

> Hi Folks,
> Got your emails from the "" website. Some very helpful
> articles on the web site. I am faced with a problem regarding "string"
> return parameters from a web serice. Explanation is below, would
> appreciate all the help. I tried searching the mailing lists, but to
> no avail.
> By default, if i have a string (which contains xml data) being
> returned as part of a JAXRPC webservice return parameter, the escape
> characters are showing up (which i presume is the default behaviour).
> At this time, i want to avoid a doc-literal style, xml-fragment style
> and soap attachments. This is because the rpc-encoded string parameter
> works best for our clients.
> Is there a way to make the soap handlers AVOID escaping the xml
> string data within the soap message? Using JWSDP 1.5
> All the help is much appreciated ... example is below:
> For example: ....
> <?xml version="1.0" encoding="UTF-8"?>
> <env:Envelope xmlns:env=""
> xmlns:xsd=""
> xmlns:xsi=""
> xmlns:enc=""
> xmlns:ns0=""
> env:encodingStyle="">
> <env:Body><ans1:getResListResponse xmlns:ans1="">
> <result xsi:type="xsd:string">
> &lt;resourcelist&gt; &lt;resource name="RES1"
> type="GEN" participant="MP1" user="USER1"
> delivery_date="2004-11-01" /&gt; &lt;/resourcelist&gt;
> </result>
> </ans1:getResListResponse>
> </env:Body>
> </env:Envelope>
> Regards,
> Mohit Saigal

I would suspect that it's not possible to have the SOAP handlers not
escape the XML, since it would wreak havoc internally. But it's a
simple matter to simply parse the string you receive as a valid XML
fragment, which will recognize and correctly handle those escaped
characters. And then you can serialize the resulting string and handle
it as needed.

= Steve =
Steve W. Jackson
Montgomery, Alabama

To unsubscribe, e-mail:
For additional commands, e-mail: