Oops... You're right. It works better now.

Thank you :)



On Tue, 11 Nov 2003 09:22:53 +0100
"Wolfgang Vullhorst" <[EMAIL PROTECTED]> wrote:

> Hi,
>   I think in your client's code you also have to register the typemapping
> for the intmsg.IntMsg object (BeanSerializer).
> 
> Wolfgang
> 
> -----Ursprungliche Nachricht-----
> Von: JC [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 10. November 2003 17:22
> An: [EMAIL PROTECTED]
> Betreff: Serializer not found for array of objects
> 
> 
> 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!
> 
> 


--
Jean-Christophe Praud         -      http://shub-niggurath.com
Conseil & D�veloppement Informatique      http://www.praud.com
Ph'nglui mglw'nafh Cthulhu n'gah Bill R'lyeh Wgah'nagl fhtagn!

Reply via email to