users@jax-rpc.java.net

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

From: Bubble Lo <mybubblelo_at_yahoo.com>
Date: Mon, 19 Jan 2004 17:37:54 -0800 (PST)

Thanks Bobby. I would really appreciate if you can give me some ideas to work around this problem.
 
Thanks.

Bobby Bissett - Javasoft <robert.bissett_at_sun.com> wrote:
>
> 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:
bert [AMP]amp; ernie
Response has:
bert [AMP]amp; ernie

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:
bert [AMP]amp;amp;[AMP]amp;amp; ernie
Response has:
bert [AMP]amp;amp;[AMP]amp;amp; ernie

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


---------------------------------
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes