I don't know the details of the Axis implementation, but two things you might like to 
check are:

1. Make sure you are using multirefs (<parameter name="sendMultiRefs" value="true"/> 
in server-config.wsdd), otherwise I can't see a way this will ever work.

2. Make sure your User and Group objects properly implement (override) the equals() 
method so that Axis can recognise it is serializing the same object again.

Hope this helps
Keith


-----Original Message-----
From: Andrew Hawkes [mailto:[EMAIL PROTECTED]
Sent: 26 December 2003 07:44
To: [EMAIL PROTECTED]
Subject: circular references


I'm having a problem with circular references during serialization.

For example, say I have two types: User and Group. User has a 
getGroup() method, and Group has a getUsers() method which returns an 
array of users.

Since this basically amounts to a circular reference, Axis goes into 
infinite recursion when it tries to serialize the response, and simply 
hangs forever spitting out huge log messages.

It seems like SOAP should have a more intelligent way to handle this. 
Is there a known solution, other than removing the circular reference 
from my objects?

Thanks,
Andrew

Reply via email to