Hi all,

I'm trying to send arrays of user defined objects to a service, and get this exception:
AXIS FAULT: java.io.IOException: No serializer found for class intmsg.IntMsg in 
registry [EMAIL PROTECTED]

Here is my deployment descriptor:

<deployment xmlns="http://xml.apache.org/axis/wsdd/";
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
 <service name="IntMsg" provider="java:RPC">
  <parameter name="className" value="intmsg.Server"/>
  <parameter name="allowedMethods" value="*"/>
  <typeMapping 
        qname="myNS:IntMsg"
        type="java:intmsg.IntMsg"
        xmlns:myNS="urn:BeanService" 
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        />
  <typeMapping 
        qname="myNS:IntMsgArray"
        type="java:intmsg.IntMsg[]"
        xmlns:myNS="urn:BeanService" 
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
        serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
        deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
        />
 </service>
</deployment>


And my code:

IntMsg[] imt = new IntMsg[nbm];
(fill the array with IntMsg objects)

Service service = new Service();
Call call = (Call) service.createCall();
QName qn = new QName("urn:BeanService", "IntMsgArray");
call.registerTypeMapping(
        IntMsg[].class,
        qn,
        new org.apache.axis.encoding.ser.ArraySerializerFactory(),
        new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
call.setTargetEndpointAddress(url);
call.setOperationName(new QName("IntMsgArray", "receiveArray"));
call.addParameter("imt", qn, ParameterMode.IN);
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
String result = (String) call.invoke(new Object[] { imt });
(the exception rises here)

It works well when I send the IntMsg objects one by one...

What did I miss ?


Best regards




--
Jean-Christophe Praud         -      http://shub-niggurath.com
Ph'nglui mglw'nafh Cthulhu n'gah Bill R'lyeh Wgah'nagl fhtagn!

Reply via email to