users@jax-rpc.java.net

Re: wrong ampersand encoding when using handlers

From: Bobby Bissett - Javasoft <Robert.Bissett_at_Sun.COM>
Date: Wed, 29 Jun 2005 16:02:33 -0400

Alessio Cervellin wrote:
> When using a client handler, the ampersand char is not encoded properly: "&" becomes "&amp;amp;" instead of "&amp;".
> This was a known behavior more than 1 year ago (https://jax-rpc.dev.java.net/servlets/ReadMsg?listName=users&msgNo=1604) which should have been fixed, but I still get this error with JWSDP1.5 (wscompile 1.1.2_01, build R40).
> Can anyone confirm this? Is this a regression or it has been never fixed in the official release?

Hi Allesio,

I tried to reproduce this with a fresh jwsdp1.5 install and couldn't see
the problem. I've seen it before, so I know there used to be an issue,
but I can't recreate it with build "1.1.2_01, build R40". I also tried
it with a slightly later version from a workspace (1.1.2_04), the
workspace from which jwsdp1.6 (1.1.3), and the jax-ws 2.0 workspace. The
good news is that the problem was fixed at some point, but I'd rather be
able to reproduce the issue with an older version to make sure I am
doing the right thing.

I created simple apps with each of the jax-rpc/ws with a handler on the
client side, and had the client send a string such as "a & b" to the
server. In each case, watching the http traffic over the wire, I am
seeing "a &amp; b" in the request rather than the &amp;amp; double
encoded version.

If you have a chance, you could try the new pack to see if the issue is
there, and that may help us figure out if you have older jars or if I'm
missing the point on the test case:
http://java.sun.com/webservices/downloads/webservicespack.html

Sorry to take so long to get back to you on this.

Cheers,
Bobby