I've started playing with this and it seems to work correctly. (More testing needed) But one issue I came across was in the generated Client objects.
My server side object looks as follows: public class QuoteDTO { @XmlAttribute @XmlIDREF protected CustomerDTO customer; But my generated Client object looks as follows: public class QuoteDTO { @XmlAttribute @XmlIDREF protected Object customer; So now when my client attempts to access the customer the specific data type is lost. Is there any work around for this? Thanks... Chris Mathrusse [EMAIL PROTECTED] Sybase, Inc One Sybase Drive Dublin, CA 94568 (925) 236-5553 Daniel Kulp <[EMAIL PROTECTED]> 04/11/2008 12:44 PM Please respond to cxf-user@incubator.apache.org To cxf-user@incubator.apache.org cc Subject Re: bi-directional relationships Wow. This is neet. I didn't know about this one at all. I honestly though JAXB wouldn't do it. I learned something today. :-) Thanks Glen! Dan On Thursday 10 April 2008, Glen Mazza wrote: > Here you go: > https://jaxb.dev.java.net/guide/Mapping_cyclic_references_to_XML.html > > Glen > > Am Donnerstag, den 10.04.2008, 16:12 -0700 schrieb > > [EMAIL PROTECTED]: > > I'm using CXF 2.0.5. My Web Service is as follows: > > @WebService(endpointInterface = "com.sybase.it.quoting.QuoteBroker", > > portName = "QuoteBroker", targetNamespace = > > "http://quoting.it.sybase.com", name = "QuoteBroker") > > @SOAPBinding(parameterStyle = ParameterStyle.WRAPPED, style = > > Style.DOCUMENT, use = Use.LITERAL) > > @Service("quoteBroker") > > public abstract class QuoteBrokerImpl implements QuoteBroker ... > > > > > > I am returning DTO's from my web service that are populated with > > data from my Hibernate objects. The problem that I am running into > > now is the following exception: > > > > INFO: Interceptor has thrown exception, unwinding now > > org.apache.cxf.interceptor.Fault: Marshalling Error: A cycle is > > detected in the object graph. This will cause infinitely deep XML: > > [EMAIL PROTECTED] -> > > [EMAIL PROTECTED] -> > > [EMAIL PROTECTED] > > > > This is due to the relationship that is defined. Quote -> > > QuoteLineItem -> Quote > > Because the relationship is bi-directional I am seeing this > > exception occurring. The Web Service is a replacement of an old Axis > > 1.0 RPC/Encoded web service. Now that I have it running with CXF > > using > > Document/Literal/Wrapped I am seeing this issue. > > > > How have others resolved/worked around this issue? > > > > Thanks... > > > > Chris Mathrusse > > [EMAIL PROTECTED] > > Sybase, Inc > > One Sybase Drive > > Dublin, CA 94568 > > (925) 236-5553 -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog