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 "Soti, Dheeraj" <ds...@harris.com> on 2005/04/12 22:39:03 UTC

General Question about having custom Serializer/Deserializer

Hi,

I have a schema which has cyclic loops and AXIS goes into a circular loop while
trying to serialize the objects (throws Stack overflow exception). I can write
my own serializer/deserializer but I am confused that how it is going to work on
client's end. In addition to WSDL wouldn't the client also need the
serializer/deserializer? Till now I have been thinking that the best approach is
to just write a WSDL and that is the only thing any client would need to get
access to my service. If I make sure that it is interoperable then they can
generate client side proxies in any environment and they should be ready to go.
I can generate server side classes using AXIS or anything other tool.

Am I correct or I am missing some very basic concept here?

Thanks

Dheeraj

Re: General Question about having custom Serializer/Deserializer

Posted by Jeff Greif <jg...@alumni.princeton.edu>.
I think this is a bug in Axis.  By cyclic loops in the schema, the 
poster probably means recursive types, but there could be implicit loops 
in an instance document via IDREFs.

Recursive (or mutually recursive) types are sometimes desirable.  
Consider an organization chart, or the descenants or ancestors of a 
person in a genealogy application.  There is no reason why the 
serialization code shoould crash with a stack overflow since the data 
actually sent clearly has a recursion which terminates.

Cycles using IDREFs should be handled using the multiref construct in 
serialization.  It seems to me a bug if this fails.

Jeff

Anne Thomas Manes wrote:

>Don't put cyclic loops in your schema.
>
>On Apr 12, 2005 4:39 PM, Soti, Dheeraj <ds...@harris.com> wrote:
>  
>
>>Hi,
>>
>>I have a schema which has cyclic loops and AXIS goes into a circular loop while
>>trying to serialize the objects (throws Stack overflow exception). I can write
>>my own serializer/deserializer but I am confused that how it is going to work on
>>client's end. In addition to WSDL wouldn't the client also need the
>>serializer/deserializer? Till now I have been thinking that the best approach is
>>to just write a WSDL and that is the only thing any client would need to get
>>access to my service. If I make sure that it is interoperable then they can
>>generate client side proxies in any environment and they should be ready to go.
>>I can generate server side classes using AXIS or anything other tool.
>>
>>Am I correct or I am missing some very basic concept here?
>>
>>Thanks
>>
>>Dheeraj
>>
>>    
>>
>
>
>  
>


Re: General Question about having custom Serializer/Deserializer

Posted by Anne Thomas Manes <at...@gmail.com>.
Don't put cyclic loops in your schema.

On Apr 12, 2005 4:39 PM, Soti, Dheeraj <ds...@harris.com> wrote:
> Hi,
> 
> I have a schema which has cyclic loops and AXIS goes into a circular loop while
> trying to serialize the objects (throws Stack overflow exception). I can write
> my own serializer/deserializer but I am confused that how it is going to work on
> client's end. In addition to WSDL wouldn't the client also need the
> serializer/deserializer? Till now I have been thinking that the best approach is
> to just write a WSDL and that is the only thing any client would need to get
> access to my service. If I make sure that it is interoperable then they can
> generate client side proxies in any environment and they should be ready to go.
> I can generate server side classes using AXIS or anything other tool.
> 
> Am I correct or I am missing some very basic concept here?
> 
> Thanks
> 
> Dheeraj
>