bimargulies wrote:
> 
> CXF uses JAXB if you configure JAXB. If you configure Aegis, it uses
> Aegis. How are you configuring?
> 

I have a similar problem as the one reported by Maxime. CXF should use JAXB
by default [1], and according to the related stack trace, I believe it does
so:

## stack trace
Caused by: org.apache.cxf.interceptor.Fault: Marshalling Error: A cycle is
detected in the object graph. This will cause infinitely deep XML:
com.example.test.cxf.xmltransient.model.par...@0 ->
com.example.test.cxf.xmltransient.model.ch...@0 ->
com.example.test.cxf.xmltransient.model.par...@0
        at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:159)
        at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:169)
        at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:104)
        at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:226)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:469)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:299)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:251)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
        ... 25 more
##

I use CXF 2.1.4 and changed the bundled Spring libraries to 2.5.6. I have
filed an issue in JIRA and attached a test case:
   https://issues.apache.org/jira/browse/CXF-2041

There are similar issues and appropriate documentation, but I could not find
pointers to what I was doing wrong. The most informative links I have found
regarding this problem:

  https://issues.apache.org/jira/browse/CXF-1121 (apparently resolved in
2.0.3)
  https://jaxb.dev.java.net/guide/Mapping_cyclic_references_to_XML.html
  

I hope someone can help here.

Thank you,
Kariem  




[1] See first paragraph in
http://cwiki.apache.org/CXF20DOC/jaxb.html 
-- 
View this message in context: 
http://www.nabble.com/CXF-doesn%27t-respect-annotations-tp19894613p22022406.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to