You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Hartmut Bernecker <h....@dhw.de> on 2001/06/20 15:35:48 UTC

Question concerning String marshalling

Hello,


when sending some String-data from a (C++) SOAP Server (4S4C) via SOAP
to an Client (Apache Java SOAP Client) then characters like "&" are
transformed to Entity-References (&amp;).

Here the way of the String:
--------------------------

Original String (Server):
   "Test &#x1234; &#12345; Hartmut & Bernecker"

String in the SOAP-Protocol (Transport):
   "Test &amp;amp;#x1234; &amp;amp;#12345; Hartmut &amp;amp; Bernecker"

Received String (Client):
   "Test &amp;#x1234; &amp;#12345; Hartmut &amp; Bernecker"

Why?
And is there a way to prevent that kind of marshalling??


Cheers
Hartmut Bernecker

Re: Question concerning String marshalling

Posted by Simon Fell <so...@zaks.demon.co.uk>.
its required because
<param1>Hartmut & Bernecker</param1> is not well formed XML and will
be rejected by the parser. the client parser should unescape it to
leave you with the original string (which doesn't appear to be
happening). It does appear that the source string is getting escaped
twice, don't know why, are you escaping it before passing it back to
4s4c ?

Cheers
Simon


On Wed, 20 Jun 2001 15:35:48 +0200, in soap you wrote:

>Hello,
>
>
>when sending some String-data from a (C++) SOAP Server (4S4C) via SOAP
>to an Client (Apache Java SOAP Client) then characters like "&" are
>transformed to Entity-References (&amp;).
>
>Here the way of the String:
>--------------------------
>
>Original String (Server):
>   "Test &#x1234; &#12345; Hartmut & Bernecker"
>
>String in the SOAP-Protocol (Transport):
>   "Test &amp;amp;#x1234; &amp;amp;#12345; Hartmut &amp;amp; Bernecker"
>
>Received String (Client):
>   "Test &amp;#x1234; &amp;#12345; Hartmut &amp; Bernecker"
>
>Why?
>And is there a way to prevent that kind of marshalling??
>
>
>Cheers
>Hartmut Bernecker


Re: Question concerning String marshalling

Posted by Simon Fell <so...@zaks.demon.co.uk>.
its required because
<param1>Hartmut & Bernecker</param1> is not well formed XML and will
be rejected by the parser. the client parser should unescape it to
leave you with the original string (which doesn't appear to be
happening). It does appear that the source string is getting escaped
twice, don't know why, are you escaping it before passing it back to
4s4c ?

Cheers
Simon


On Wed, 20 Jun 2001 15:35:48 +0200, in soap you wrote:

>Hello,
>
>
>when sending some String-data from a (C++) SOAP Server (4S4C) via SOAP
>to an Client (Apache Java SOAP Client) then characters like "&" are
>transformed to Entity-References (&amp;).
>
>Here the way of the String:
>--------------------------
>
>Original String (Server):
>   "Test &#x1234; &#12345; Hartmut & Bernecker"
>
>String in the SOAP-Protocol (Transport):
>   "Test &amp;amp;#x1234; &amp;amp;#12345; Hartmut &amp;amp; Bernecker"
>
>Received String (Client):
>   "Test &amp;#x1234; &amp;#12345; Hartmut &amp; Bernecker"
>
>Why?
>And is there a way to prevent that kind of marshalling??
>
>
>Cheers
>Hartmut Bernecker