users@jax-rpc.java.net

Re: char encoding problem

From: Doug Kohlert <doug.kohlert_at_sun.com>
Date: Wed, 20 Aug 2003 16:17:37 -0700

Andrea,
According to section 2.2 of the From the XML 1.0 spec
(http://www.w3.org/TR/2000/REC-xml-20001006). The characters must be:

Char ::= x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]

Hence character decimal 25 is not supported.

andrea sponziello wrote:
> Hi all,
>
> a little problem using JAX-RPC...
>
> I rewrote the Hello example in this way:
>
>
> HelloImpl.java
> -------------------------------------------
> package helloservice;
>
> public class HelloImpl implements HelloIF {
>
> public String message = "Hello "+(char) 25; // CHANGED HERE ADDING
> THE CHAR (ASCII=25)
>
> public String sayHello(String s) {
> return message + s;
> }
> }
> -------------------------------------------
>
> (I changed the message string adding the char with ASCII code 25)
>
> and running the staticstubstub example I riceived this on my console:
>
> run-client:
> [java] Endpoint address = http://localhost:8080/hello-jaxrpc/hello
> [java] java.rmi.RemoteException: Runtime exception; nested
> exception is:
> [java] deserialization error: XML parsing error:
> com.sun.xml.rpc.sp.ParseException:2: com.sun.xml.rpc.sp/P-071 19
> [java] at
> com.sun.xml.rpc.client.StreamingSender._handleRuntimeExceptionInSend(StreamingSender.java:258)
> [java] at
> com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:240)
> [java] at staticstub.HelloIF_Stub.sayHello(HelloIF_Stub.java:68)
> [java] at staticstub.HelloClient.main(Unknown Source)
> [java] Caused by: deserialization error: XML parsing error:
> com.sun.xml.rpc.sp.ParseException:2: com.sun.xml.rpc.sp/P-071 19
>
> I made a mistake? Not all ASCII chars can be in a String data type
> returned by a Web Service? Is there a way to solve this problem?
>
> Thanks in advance,
>
> regards,
> Andrea.


-- 
Doug Kohlert
Java Software Division
Sun Microsystems, Inc.
phone: 503 345-9806