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 Vali Grigoras <gr...@gmail.com> on 2006/06/16 04:43:11 UTC

Axis 1.2 - Object graph serialization

Hello,

I'm a newbie to Webservices and I have a simple question for you regarding
RPC web services and java objects serialization. I would like to know if
there are any limitations in serializing objects graphs. For example if I
have a one to many relation between a Parent and Child and the data model
looks like:

  class  Parent {
    private String name;
    private Set children;
    ...
    // removed the getter and setter
  }

 class Child{
    private String name;
    private Parent;
    ...
   // removed the getter and setter
 }

Any help is greatly appreciated.
Vali

Re: Axis 1.2 - Object graph serialization

Posted by Rodrigo Ruiz <rr...@gridsystems.com>.
Hi Vali,

Axis 1.2 does not support serialization of Set attributes. You will have 
to convert them to arrays.

While you stick to RPC/encoded style you will have no problem. 
Document/literal does not allow references, and so it forgives loops in 
your graph. This means that your "parent" field in the Child class 
should be removed, because otherwise the serializer would enter into an 
infinite loop and crash your server with an OutOfMemory.

Vali Grigoras wrote:
> Hello,
> 
> I'm a newbie to Webservices and I have a simple question for you 
> regarding RPC web services and java objects serialization. I would like 
> to know if there are any limitations in serializing objects graphs. For 
> example if I have a one to many relation between a Parent and Child and 
> the data model looks like:
> 
>   class  Parent {
>     private String name;
>     private Set children;
>     ...
>     // removed the getter and setter
>   }
> 
>  class Child{
>     private String name;
>     private Parent;
>     ...
>    // removed the getter and setter
>  }
> 
> Any help is greatly appreciated.
> Vali
> 
> 
> ------------------------------------------------------------------------
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.9.0/366 - Release Date: 15/06/2006

-- 
-------------------------------------------------------------------
GRIDSYSTEMS                    Rodrigo Ruiz Aguayo
Parc Bit - Son Espanyol
07120 Palma de Mallorca        mailto:rruiz@gridsystems.com
Baleares - EspaƱa              Tel:+34-971435085 Fax:+34-971435082
http://www.gridsystems.com
-------------------------------------------------------------------


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.0/366 - Release Date: 15/06/2006


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org