You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Ivan Vitoria Sanchez <iv...@grupoica.com> on 2010/11/30 16:24:43 UTC
XmlID & XmlIDREF
Hello,
I have some parent/child associations (one-to-one and many-to-one) between
my beans. To avoid cyclic references, i'm annotating these beans with @XmlID
and @XmlIDREF. Sometimes the bean is marshalled as follows:
<child>
<id>2</id>
<parent>1</parent>
</child>
But other times my output is:
<child>
<id>2</id>
<parent><id>1</id></parent>
</child>
Do you know why this is happening?
Thanks,
Ivan
Re: XmlID & XmlIDREF
Posted by Glen Mazza <gl...@gmail.com>.
If you haven't read it yet, perhaps [1] can help.
Marshalling/Unmarshalling is handled by the JAXB library, not CXF, so it
may be better to ask on the JAXB user's list[2]. Probably best to
provide a pure JAXB sample, the most minimal possible that reproduces
the problem. If no response on that list either, then you have a JAXB
bug to report using the JAXB issue tracker.
[1] http://jaxb.java.net/guide/Mapping_cyclic_references_to_XML.html
[2] http://java.net/projects/jaxb/lists/
On 12/09/2010 05:14 AM, Ivan Vitoria Sanchez wrote:
> Nobody knows?
>
> -----Mensaje original-----
> De: Ivan Vitoria Sanchez [mailto:ivitoria@grupoica.com]
> Enviado el: miércoles, 01 de diciembre de 2010 9:42
> Para: users@cxf.apache.org
> Asunto: RE: XmlID& XmlIDREF
>
> Sorry, CXF 2.3.0 and JAXBDataBinding
>
> Ivan Vitoria Sanchez
>
> Districte 22@ - Complexe Ecourban - Edifici Blau
> C / Almogàvers 119-123, 3º 4ª - 08018 Barcelona
> Tel. 93 452 02 65 Fax. 93 451 35 42
>
>
>
> -----Mensaje original-----
> De: Benson Margulies [mailto:bimargulies@gmail.com]
> Enviado el: martes, 30 de noviembre de 2010 17:15
> Para: users@cxf.apache.org
> Asunto: Re: XmlID& XmlIDREF
>
> What version of CXF? What data binding?
>
> On Tue, Nov 30, 2010 at 10:24 AM, Ivan Vitoria Sanchez
> <iv...@grupoica.com> wrote:
>
>> Hello,
>>
>>
>>
>> I have some parent/child associations (one-to-one and many-to-one) between
>> my beans. To avoid cyclic references, i'm annotating these beans with @XmlID
>> and @XmlIDREF. Sometimes the bean is marshalled as follows:
>>
>>
>>
>> <child>
>>
>> <id>2</id>
>>
>> <parent>1</parent>
>>
>> </child>
>>
>>
>>
>> But other times my output is:
>>
>>
>>
>> <child>
>>
>> <id>2</id>
>>
>> <parent><id>1</id></parent>
>>
>> </child>
>>
>>
>>
>> Do you know why this is happening?
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Ivan
>>
>>
>>
>
RE: XmlID & XmlIDREF
Posted by Ivan Vitoria Sanchez <iv...@grupoica.com>.
Nobody knows?
-----Mensaje original-----
De: Ivan Vitoria Sanchez [mailto:ivitoria@grupoica.com]
Enviado el: miércoles, 01 de diciembre de 2010 9:42
Para: users@cxf.apache.org
Asunto: RE: XmlID & XmlIDREF
Sorry, CXF 2.3.0 and JAXBDataBinding
Ivan Vitoria Sanchez
Districte 22@ - Complexe Ecourban - Edifici Blau
C / Almogàvers 119-123, 3º 4ª - 08018 Barcelona
Tel. 93 452 02 65 Fax. 93 451 35 42
-----Mensaje original-----
De: Benson Margulies [mailto:bimargulies@gmail.com]
Enviado el: martes, 30 de noviembre de 2010 17:15
Para: users@cxf.apache.org
Asunto: Re: XmlID & XmlIDREF
What version of CXF? What data binding?
On Tue, Nov 30, 2010 at 10:24 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:
> Hello,
>
>
>
> I have some parent/child associations (one-to-one and many-to-one) between
> my beans. To avoid cyclic references, i'm annotating these beans with @XmlID
> and @XmlIDREF. Sometimes the bean is marshalled as follows:
>
>
>
> <child>
>
> <id>2</id>
>
> <parent>1</parent>
>
> </child>
>
>
>
> But other times my output is:
>
>
>
> <child>
>
> <id>2</id>
>
> <parent><id>1</id></parent>
>
> </child>
>
>
>
> Do you know why this is happening?
>
>
>
> Thanks,
>
>
>
> Ivan
>
>
RE: XmlID & XmlIDREF
Posted by Ivan Vitoria Sanchez <iv...@grupoica.com>.
Sorry, CXF 2.3.0 and JAXBDataBinding
Ivan Vitoria Sanchez
Districte 22@ - Complexe Ecourban - Edifici Blau
C / Almogàvers 119-123, 3º 4ª - 08018 Barcelona
Tel. 93 452 02 65 Fax. 93 451 35 42
-----Mensaje original-----
De: Benson Margulies [mailto:bimargulies@gmail.com]
Enviado el: martes, 30 de noviembre de 2010 17:15
Para: users@cxf.apache.org
Asunto: Re: XmlID & XmlIDREF
What version of CXF? What data binding?
On Tue, Nov 30, 2010 at 10:24 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:
> Hello,
>
>
>
> I have some parent/child associations (one-to-one and many-to-one) between
> my beans. To avoid cyclic references, i'm annotating these beans with @XmlID
> and @XmlIDREF. Sometimes the bean is marshalled as follows:
>
>
>
> <child>
>
> <id>2</id>
>
> <parent>1</parent>
>
> </child>
>
>
>
> But other times my output is:
>
>
>
> <child>
>
> <id>2</id>
>
> <parent><id>1</id></parent>
>
> </child>
>
>
>
> Do you know why this is happening?
>
>
>
> Thanks,
>
>
>
> Ivan
>
>
Re: XmlID & XmlIDREF
Posted by Benson Margulies <bi...@gmail.com>.
What version of CXF? What data binding?
On Tue, Nov 30, 2010 at 10:24 AM, Ivan Vitoria Sanchez
<iv...@grupoica.com> wrote:
> Hello,
>
>
>
> I have some parent/child associations (one-to-one and many-to-one) between
> my beans. To avoid cyclic references, i'm annotating these beans with @XmlID
> and @XmlIDREF. Sometimes the bean is marshalled as follows:
>
>
>
> <child>
>
> <id>2</id>
>
> <parent>1</parent>
>
> </child>
>
>
>
> But other times my output is:
>
>
>
> <child>
>
> <id>2</id>
>
> <parent><id>1</id></parent>
>
> </child>
>
>
>
> Do you know why this is happening?
>
>
>
> Thanks,
>
>
>
> Ivan
>
>