axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shyamal Shah" <>
Subject Consuming Web Service that returns object - blank object problem
Date Mon, 15 Jan 2007 23:47:49 GMT
   I am consuming a web service in a client. I have two methods one that
returns back an xml string and another one that returns the object. When I
call the method that returns xml back it works fine as expected. In case of
calling method that returns object, it returns blank object. Is there
anything I am doing wrong in the client code? Could anyone please advise if
I am missing something obvious? Below is my client code :

        Service service = new Service();
        Call call = (Call) service.createCall();

        String custId = "999";
        String maSrNo = "555";
            call.setOperationName(new QName("", "getCustomerTO"));
        call.addParameter ("custId", org.apache.axis.encoding
        call.addParameter("maSrNo", org.apache.axis.encoding.XMLType.XSD_INT
, javax.xml.rpc.ParameterMode.IN <>);
        QName qnm = new QName("<>",
        call.registerTypeMapping (CustInfoTO.class, qnm, new
org.apache.axis.encoding.ser.BeanSerializerFactory (CustInfoTO.class, qnm),
new org.apache.axis.encoding.ser.BeanDeserializerFactory(CustInfoTO.class,
        call.setReturnType(new QName("
<>", "getCustomerTO"));
        CustInfoTO result = (CustInfoTO) call.invoke(new Object[] { custId,
maSrNo });
        System.out.println("Result is " + result.getCCVL_CU_NO());
//////////all the attributes in the object are set to null or 0 and not what
I expect in the object.

    I will appreciate any help/suggestion on this.


View raw message