UrgentHelp: XmlPullParserException UnsupportedEncoding
Thomas Stark <[email protected]> Wed, 23 Jul 2003 16:50:20 +0200
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Organization | VMZBerlin |
| Message-ID | <[email protected]> |
Hi list,
I have a problem to run my application on mobile devices. There are no
exceptions on Java J2ME WirelessToolkit (2.0) - I think the webservice
works fine!
Now my problem: On Sony-Clie Palm (kJVM MIDP4Palm) and Casio E-200
PocketPC (kJVM KadaSystems) are errors in HttpTransport, in the code:
The ht.call(..) method has an XmlPullParserException:
"Invalid stream or encoding: java.io.UnsupportedEncodingException:
UTF-9 (position:START_DOCUMENT null@0:0) caused by:
java.io.UnsupportedEncodingException UTF-8"
See code below:
> String symbol = "test test";
>
> SoapObject rpc =
> new SoapObject("urn:HelloWorld", "sayHello");
>
> rpc.addProperty("symbol", symbol);
>
> SoapSerializationEnvelope envelope =
> new SoapSerializationEnvelope(SoapEnvelope.VER10);
>
> envelope.bodyOut = rpc;
>
> HttpTransport ht = new HttpTransport("http://mydomain/servlet/rpcrouter");
>
> ht.debug = true;
>
> try {
> ht.call("urn:HelloWorld#sayHello", envelope);
> }
> catch (Exception e) {
> error += e.toString();
> }
Is this problem solved by other encoding? How can I change the
Encoding?
Lot of thanks,
Thomas Stark