1

According to this site about SOAP 1.2, multi-reference values may be encoded in-place. How do I get CXF/Jaxb to marshall and unmarshall this kind of content?

Jaxb's IDRef annotation is treated as a string by .NET. It's also an all-or-nothing annotation; meaning it doesn't seem able to be able to mix-and-match a reference with a fully marshalled object like so...

<parent>
    <child id="a" value="123" />
    <child ref="a" />
</parent>

The end goal is to be able to deliver a SOAP payload with inter-object referencing that both .NET and Java can consume out-of-the box.

Community
  • 1
  • 1
Andrew White
  • 52,720
  • 19
  • 113
  • 137
  • possible duplicate of [Can JAXB marshal by containment at first then marshal by @XmlIDREF for subsequent references?](http://stackoverflow.com/questions/7587095/can-jaxb-marshal-by-containment-at-first-then-marshal-by-xmlidref-for-subsequen) – bdoughan Jun 14 '12 at 12:35
  • @BlaiseDoughan: no, that does not address the .NET side of the question nor is it out-of-box. Futhermore the accepted answer does not use IDRefs but rather a custom adapter that appears to allow duplication ids to appear in the document which seems "off" to me. – Andrew White Jun 14 '12 at 12:52
  • The accepted answer to the referenced question is mine. There aren't really duplicate ids, the id attribute is just serving double duty as id/idref, and could be changed to be separate attributes. – bdoughan Jun 14 '12 at 13:13
  • Still, this is a custom solution that would require any consumer of our service to adapt. So, I think that eliminates the possibility that this question is a duplicate. – Andrew White Jun 14 '12 at 13:31

0 Answers0