users@jax-rpc.java.net

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

From: Bobby Bissett - Javasoft <robert.bissett_at_sun.com>
Date: Wed, 28 Jan 2004 10:24:15 -0500

Hi again,

Sorry for the delay. Just a couple comments below:

Bubble Lo wrote:
> Since the returned java bean has a lot of properties and each property
> may contains those characters, the handler may take time to check and
> fix each element.

Yep, it's going to be performance hit, but there's no way to avoid the
bug that's in the xml writing code. Offhand, I might try a method in my
handler that takes a Node (w3c node, which is a superclass of
SOAPElement) and does something like this:

     if (node.getNodeType() == Node.TEXT_NODE) {
         //handle the text in the node
         return;
     }
     NodeList list = node.getChildNodes();
     for (int i=0; i<list.getLength(); i++) {
         callSameMethod(list.item(i)); // recursive call
     }


Or you could get the Source from the SOAPMessage and do a transform in
one step, but as long as the DOM tree has already been created in the
SOAPMessage I'd use it. As always, there may be faster ways and that's
just my suggestion this morning...

>
> Can I get the patch? If not, can I get the build from CVS? When is the
> next official release?

The fastest way you can get it is that we're going to have binary
releases on java.net soon. Unfortunately, I can't define "soon" :). They
won't be fully tested and supported releases like in the web services
pack, but will have bug fixes in them and you can give them a try.

Cheers,
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