users@jax-rpc.java.net

Re: JAX-RPC special character (like ampersand) encoding question

From: Bobby Bissett - Javasoft <robert.bissett_at_sun.com>
Date: Fri, 16 Jan 2004 14:56:26 -0500

>
> I attached the my handler class. The handler doesn't do anything because
> I tried to narrow down what causes that happens.
> Could you please take a look and test it again with the attached handler
> class?

Since I've seen your original email look different after it's been
replied to with other people's emailers, I'm not going to use the
"ampersand" sign here but will use "[AMP]" to mean the sign so things
stay how I wrote them (hopefully).

I tried a simple echoString() method with no handlers and sent "bert
[AMP] ernie" and got back:

result: "bert [AMP] ernie"
Request has:
<String_1...>bert [AMP]amp; ernie</String_1>
Response has:
<result...>bert [AMP]amp; ernie</result>

So far, so good.

When I throw a simple handler like yours on there I get:

result: "bert [AMP]amp;[AMP]amp; ernie"
Request has:
<String_1...>bert [AMP]amp;amp;[AMP]amp;amp; ernie</String_1>
Response has:
<result...>bert [AMP]amp;amp;[AMP]amp;amp; ernie</result>

When you don't use handlers, the jaxrpc runtime creates the xml itself
and parses the response, so it encodes the symbol and decodes it later.
When you add a handler, even if the handler does nothing, the runtime
has to create a SOAPMessage to pass into the handler's handleXYZ()
methods. So I think [AMP]->[AMP]amp;->[AMP]amp;amp; since the symbol is
being escaped twice. (Not sure how it gets doubled as well.)

I can't think of any workaround now, but will look at the way we create
the SOAPMessage to see what we can do about it.

Thanks,
Bobby

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net