Hi
On 10/09/12 13:03, TacheDeChoco wrote:
Yes, I"ve got it !!!
Actually, the problem occurs when the JAX-RS service/method is returning a
*List* of JAXB objects.

E.g.

@GET
@Path("/{de_id}/demarches")
@Produces("application/xml")
public List<Demarche>  getDemarches(@PathParam("de_id") Integer deId) {...}
- works well without transformation (using JAXBElementProvider)
- but fails with transformation (using XSLTJaxbProvider)

If i wrap the obtained List of "Demarche" into a JAXB-annotated bean:

@GET
@Path("/{de_id}/demarches")
@Produces("application/xml")
public MyListOfDemarche getDemarches(@PathParam("de_id") Integer deId) {...}

is now transformed without error :-)

So, for some reason, the JAXBElementProvider is able to marshall "raw" list,
while XSLTJaxbProvider is not...

Thanks for your help.
And sorry for the noise.

Thanks for the confirmation and no problem at all.

When we have explicit collections, the base provider is calling 'marshall' per every collection member so it breaks with XSLT. I'll restrict XSLTJaxbProvider to support only non-explicit collection payloads

Thanks, Sergey


Regards,
Bernard.



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Strange-NPE-with-XSLTJaxbProvider-tp5713703p5713752.html
Sent from the cxf-user mailing list archive at Nabble.com.


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to