cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher.Mathru...@sybase.com
Subject Re: bi-directional relationships
Date Fri, 11 Apr 2008 03:41:49 GMT
Glen, 

Thanks ever so much! This is exactly what I needed to further my 
understanding. 

You Da Man!!!

Chris Mathrusse
christopher.mathrusse@sybase.com
Sybase, Inc
One Sybase Drive
Dublin, CA 94568
(925) 236-5553



Glen Mazza <glen.mazza@verizon.net> 
04/10/2008 06:13 PM
Please respond to
cxf-user@incubator.apache.org


To
cxf-user@incubator.apache.org
cc

Subject
Re: bi-directional relationships






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
Christopher.Mathrusse@sybase.com:
> 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: 
> com.sybase.it.quoting.QuoteDTO@1355ef9 -> 
> com.sybase.it.quoting.QuoteLineitemDTO@1a729c1 -> 
> com.sybase.it.quoting.QuoteDTO@1355ef9
> 
> 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
> christopher.mathrusse@sybase.com
> Sybase, Inc
> One Sybase Drive
> Dublin, CA 94568
> (925) 236-5553




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message