RemoteException/Runtime exception in deserialize

From: Suresh Y <>
Date: Thu, 13 Feb 2003 02:38:16 -0700


I ran the program below and I get the following output/error. The Java code tries to get the exchange rate between the currencies of two countries. Interestingly I see the result of the call in the exception trace. I have run the code by passing the http.proxyHost and http.proxyPort as VM invocation parameters.

Is there something missing in the code I have written?


Exception trace:

Service name {}CurrencyExchangeService
java.rmi.RemoteException: Runtime exception; nested exception is:
 deserialization error: XML reader error: unexpected character content: "120.85"
 at com.sun.xml.rpc.client.StreamingSender._send(
 at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(
 at com.sun.xml.rpc.client.dii.BasicCall.invoke(

Caused by: deserialization error: XML reader error: unexpected character content: "120.85"
 at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(
 at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(
 at com.sun.xml.rpc.client.dii.CallInvokerImpl._readFirstBodyElement(
 at com.sun.xml.rpc.client.StreamingSender._send(
 ... 4 more
Process terminated with exit code 0

The Java code.

import javax.xml.namespace.QName;
import javax.xml.rpc.Call;
import java.util.Iterator;

public class CurrenyExchangeTest {

    public static void main(String args[]) {
         new CurrenyExchangeTest().doTest();

    void doTest() {
            javax.xml.rpc.ServiceFactory factory = javax.xml.rpc.ServiceFactory.newInstance();

            URL url = new URL("");

            javax.xml.namespace.QName serviceQName =
                  new javax.xml.namespace.QName("",

            System.out.println("Service name " + serviceQName.toString());

            javax.xml.rpc.Service service = factory.createService(url, serviceQName);

            Call call = service.createCall();

            call.setOperationName(new QName("urn:xmethods-CurrencyExchange", "getRate"));


                    new Boolean(true));

            Object returnValue = call.invoke(new String[]{"usa", "japan"});


        } catch (Exception e) {