You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Sorin Pop <ps...@regens.hu> on 2002/09/16 19:32:58 UTC

(de)serialization of an object which contains an array of another custom object without building custom (de)serializer classes

Hi,

allegedly AXIS 1.0rc can handle the (de)serialization of custom objects with
the builtin bean (de)serializer classes (beanmapping tag in the WSDD), and
these custom objects don't necessarily need to have getter/setter methods
anymore, it's enough for the (serializable) members to be declared public.

I tried it out, and it looks like it works, only to a certain point though:
when the custom object contains a public member which is an array of another
custom object. Then AXIS can handle the (de)serialization of the big object
only if I write, like before, a custom (de)serializer class for it (and I
have a typemapping tag in the deploy.wsdd file for the big object). If I use
the beanmapping tag for it, then I get the following error messages (lets
say the big class is called X, the little one Y, so X contains an array of
Ys, which is called y_array):

    java.lang.IllegalArgument Exception: array element type mismatch
    Could not convert [LY; to bean field y_array[0], type Y


I don't know where that [L in front of the class name comes from, maybe the
problem is related to that...
I have checked the SOAP message AXIS gets from the client, and I haven't
seen anything unusual in it. When I comment out the beanmapping tag and
uncover the typemapping tag for the X (yes, X, not Y, Y has a beanmapping
tag) class in the WSDD (which points to the custom (de)serializer classes),
and I redeploy the web service, then it works again.

Has anybody encountered this problem? Any suggestions?

Thanks.


beanmapping - typemapping

Posted by Sorin Pop <ps...@regens.hu>.
Hey! There's nobody in the world who had tried to do domething similar?! I
can't believe it...

----- Original Message -----
From: "Sorin Pop" <ps...@regens.hu>
To: <ax...@xml.apache.org>
Cc: "Pop Lucian Marius" <po...@regens.hu>
Sent: Monday, September 16, 2002 7:32 PM
Subject: (de)serialization of an object which contains an array of another
custom object without building custom (de)serializer classes


> Hi,
>
> allegedly AXIS 1.0rc can handle the (de)serialization of custom objects
with
> the builtin bean (de)serializer classes (beanmapping tag in the WSDD), and
> these custom objects don't necessarily need to have getter/setter methods
> anymore, it's enough for the (serializable) members to be declared public.
>
> I tried it out, and it looks like it works, only to a certain point
though:
> when the custom object contains a public member which is an array of
another
> custom object. Then AXIS can handle the (de)serialization of the big
object
> only if I write, like before, a custom (de)serializer class for it (and I
> have a typemapping tag in the deploy.wsdd file for the big object). If I
use
> the beanmapping tag for it, then I get the following error messages (lets
> say the big class is called X, the little one Y, so X contains an array of
> Ys, which is called y_array):
>
>     java.lang.IllegalArgument Exception: array element type mismatch
>     Could not convert [LY; to bean field y_array[0], type Y
>
>
> I don't know where that [L in front of the class name comes from, maybe
the
> problem is related to that...
> I have checked the SOAP message AXIS gets from the client, and I haven't
> seen anything unusual in it. When I comment out the beanmapping tag and
> uncover the typemapping tag for the X (yes, X, not Y, Y has a beanmapping
> tag) class in the WSDD (which points to the custom (de)serializer
classes),
> and I redeploy the web service, then it works again.
>
> Has anybody encountered this problem? Any suggestions?
>
> Thanks.