Best way to do is to encode the text at client side and decode the same at
server side.
This works perfectly fine for me.
Hope this solves ur problem

Prasad Duvvuri
Software Engineer, Engineering
http://www.passkey.com

The Power Behind Group Travel SM

ARE YOU PASSKEY-ENABLED?



-----Original Message-----
From: Micael Ericsson (QIN) [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 24, 2001 11:06 AM
To: '[EMAIL PROTECTED]'
Subject: RE: (Updated) Problem with < and > as parameter value


Now it is even more confusing.
I have a service method with two parameters called systemType and systemID.
Both have type String.
If I supply 'a<aa' as value to systemType I get an parser error, but NOT to
systemID parameter. I have tried all possible combinations and systemID is
always parsed correctly but systemType is never parsed correctly.

Does this make any sense?

Regards,
Micael E.
//Se below for more info


-----Original Message-----
From: Micael Ericsson (QIN) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 23, 2001 5:13 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Problem with < and > as parameter value


The problem is that soap and xerces/jaxp does a good job parsing '<' to
'&lt;', but not so good job translating back.

On clinet side an instance of Parameter class is created with 'good<day' as
value and used in Call.invoke(). Before reaching my service classes on
server side soap and xerces/jaxp parses '&lt;' back to '<' and sees this as
a problem character instead of just sending the string 'good<day' to my
service class. 

/Micael E.

-----Original Message-----
From: Ed Yu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 23, 2001 5:08 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Problem with < and > as parameter value


Here is what I've recently worked with to translate special characters into
proper XML:


 charater/sequence            entity reference(replacement)
            &                                 &amp;
          ]]>                                  ]]&gt;
           <                                   &lt;

Unfortunately, I don't recall where the source of it is from. Good Luck!

-----Original Message-----
From: Micael Ericsson (QIN) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 23, 2001 10:53 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Problem with < and > as parameter value


When using TcpTunnelGUI to monitor XML messages transfer I can see that the
sent string "good<day" (as parameter value to a service method) in the XML
message has the text "good&lt;day". 

After that Xerces/JAXP converts/serializes this to a String, but something
goes wrong and a error message is returned to SOAP client.

I have tested this on Xerces 1.2.3 and 1.4.3, and JAXP 1.1. All versions
gives error but different error messages. 

Bug in XML perser/String serializer or encoding setting?
Anyone know where to find specifivcation for which characters are possible
to user as request parameter values.

/Micael E.

-----Original Message-----
From: Paco Avila [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 23, 2001 4:35 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem with < and > as parameter value


> That's because you can't have special characters
> like < and > in your strings.  Try encoding them
> using base64 encoding.

The "<" character shold be converted to "&lt;" and
">" to "&gt;". This should be done in the SOAP library,
I think...

Reply via email to