Assuming you're writing the client code yourself, then yes I would assume
you would have to register the type mapping. I haven't done this with an
array of objects yet, but I would assume you'd do something like the
following for the issue shown in that error below:
QName qn = new QName("http://object.myObject", "MyObject");
call.registerTypeMapping(MyObject.class, qn, serializerFactory,
deserializerFactory);
where the serializer/deserializer factory args correspond to the
serializer/deserializer used for the object being passed in the array
(possibly BeanSerializer)...
-----Original Message-----
From: Mark Mueller [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 9:24 PM
To: [EMAIL PROTECTED]
Subject: Re: No deserializer defined for array type ?
I've been trying to answer the same question myself.
Are we supposed to use:
call.registerTypeMapping()
to do this? Does anyone have an example of a client
that
deserializes an array of objects?
Mark
--- McCaslin Orion <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am not having success getting an array of complex
> objects deserialized in
> a simple test client.
>
> Has anybody figured out how to solve this error?
>
> org.xml.sax.SAXException: No deserializer defined
> for array type
> {http://object.myObject}MyObject at
>
org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDeseriali
> zer.java:257)
>
>
> The Service function:
> public MyObject[] getMyObjects() {
> MyObject[] myObjArray = new MyObject[3];
> myObjArray[0]= new MyObject();
> myObjArray[1]= new MyObject();
> myObjArray[2]= new MyObject();
> return(myObjArray);
> }
>
> I've seen a few of these error postings w/o answers.
>
> In another posting, a workaround was mentioned...
> ----------------------------------------------------
> Define a class which holds your array, and make the
> new class a bean. Something like this
>
> class Folders {
> Folder[] folders;
> getter/setter functions
>
-----------------------------------------------------
> Is this really the only way?
>
> Many thanks,
> Orion
>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com