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/29 12:05:29 UTC
Specify "xsi:type" in all JAXB elements
Hello,
Is there any way to make the marshaller print xsi:type=MyClass in all JAXB
elements? Currently, this is only done when generic types are serialized
whereas specifying the type allows me to build a better parser at client
side.
Regards,
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
cid:image004.gif@01C98064.8D3140B0
Re: Specify "xsi:type" in all JAXB elements
Posted by am am <ak...@yahoo.com>.
Why would you want to do this? This is not WS-I BP conformant
________________________________
From: Daniel Kulp <dk...@apache.org>
To: users@cxf.apache.org
Cc: Ivan Vitoria Sanchez <iv...@grupoica.com>
Sent: Mon, November 29, 2010 8:21:17 PM
Subject: Re: Specify "xsi:type" in all JAXB elements
On Monday 29 November 2010 6:05:29 am Ivan Vitoria Sanchez wrote:
> Is there any way to make the marshaller print xsi:type=MyClass in all
> JAXB elements? Currently, this is only done when generic types are
> serialized whereas specifying the type allows me to build a better parser
> at client side.
I really don't think so. JAXB pretty much only adds the xsi:type in the
cases where it is required to do so. I don't think there is a way to force
it to output it in other places as well.
Dan
>
>
> Regards,
>
>
>
> 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
>
>
>
> cid:image004.gif@01C98064.8D3140B0
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Re: Specify "xsi:type" in all JAXB elements
Posted by Daniel Kulp <dk...@apache.org>.
On Monday 29 November 2010 6:05:29 am Ivan Vitoria Sanchez wrote:
> Is there any way to make the marshaller print xsi:type=MyClass in all
> JAXB elements? Currently, this is only done when generic types are
> serialized whereas specifying the type allows me to build a better parser
> at client side.
I really don't think so. JAXB pretty much only adds the xsi:type in the
cases where it is required to do so. I don't think there is a way to force
it to output it in other places as well.
Dan
>
>
> Regards,
>
>
>
> 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
>
>
>
> cid:image004.gif@01C98064.8D3140B0
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog