Given the following scenario:
My server returns an arraylist of custom_class. Why is it that it returns an
empty arraylist to my client?

I did beanmapping with the arraylist in my wsdd file.
I registerTypeMapping the arraylist in my client source code.

I'm stuck. Please help me.


----------------------------------------------------------------------------
----------------------
MY CLIENT SOURCE CODE:
----------------------------------------------------------------------------
----------------------

String csEndpointURL = new
String("http://localhost:8080/axis/services/BLService";);
Service coService = new Service();
QName coCustomclassQName = new QName ("urn:BLBeanService", "Customclass");
QName coArrayListQName = new QName ("urn:BLBeanService", "ArrayList");

Call coCall = (Call) coService.createCall();
coCall.registerTypeMapping(Customclass.class, coCustomclassQName,
        new
org.apache.axis.encoding.ser.BeanSerializerFactory(Customclass.class,
coCustomclassQName),
        new
org.apache.axis.encoding.ser.BeanDeserializerFactory(Customclass.class,
coCustomclassQName));
coCall.registerTypeMapping(ArrayList.class, coArrayListQName,
        new
org.apache.axis.encoding.ser.BeanSerializerFactory(ArrayList.class,
coArrayListQName),
        new
org.apache.axis.encoding.ser.BeanDeserializerFactory(ArrayList.class,
coArrayListQName));

coCall.setTargetEndpointAddress( new java.net.URL(csEndpointURL) );
coCall.setOperationName( new QName("BLBeanService", "getEqptCtrlInfo"));
coCall.setReturnType( coArrayListQName, ArrayList.class );

ArrayList oData = null;
oData = (ArrayList) coCall.invoke( new Object[] {} );

// oData is empty. //
----------------------------------------------------------------------------
----------------------
MY WSDD
----------------------------------------------------------------------------
----------------------

<deployment xmlns="http://xml.apache.org/axis/wsdd/";
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
    <service name="BLService" provider="java:RPC">
    <parameter name="className" value="BLServiceClass"/>
    <parameter name="allowedMethods" value="*"/>
    <beanMapping qname="BLNS:Customclass" xmlns:BLNS="urn:BLBeanService"
languageSpecificType="java:Customclass"/>
    <beanMapping qname="BLNS:ArrayList" xmlns:BLNS="urn:BLBeanService"
languageSpecificType="java:java.util.ArrayList"/>
</service>
</deployment>

Reply via email to