Re: JAX-RS JSON unexpected element

2014-02-25 Thread José Luis Cetina
Ok. @Romain The Jacksonprovider is working good, but IntellijIdea tell me that pojo-deployment tag is not allowed here, this is my openejb-jar file: openejb-jar xmlns=http://www.openejb.org/openejb-jar/1.1; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance;

Re: JAX-RS JSON unexpected element

2014-02-25 Thread Romain Manni-Bucau
We dont rely on xsd, an easy patch/contribution if you want ;) Le 25 févr. 2014 18:56, José Luis Cetina maxtorz...@gmail.com a écrit : Ok. @Romain The Jacksonprovider is working good, but IntellijIdea tell me that pojo-deployment tag is not allowed here, this is my openejb-jar file:

Re: JAX-RS JSON unexpected element

2014-02-24 Thread John D. Ament
Can you post the code for your resource? On Mon, Feb 24, 2014 at 2:05 PM, José Luis Cetina maxtorz...@gmail.com wrote: Hi, im doing my first rest service. Im having problem's with retrieving the json data, when my method is called i get an: WARNING: javax.xml.bind.UnmarshalException - with

Re: JAX-RS JSON unexpected element

2014-02-24 Thread José Luis Cetina
Hi @John, the problem is in the @XmlRootElement, Jackson provider doesn't need it, then i just add Jackson as a provider and everything works. But i dont understand why with the default provider this doesn't work. I add the jackson dependecy and the

Re: JAX-RS JSON unexpected element

2014-02-24 Thread Romain Manni-Bucau
cause default provider is using jaxb model so it needs a wrapper. Jackson doesnt. (see jettison) Side note: you can put this conf in openejb-jar.xml Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github:

Re: JAX-RS JSON unexpected element

2014-02-24 Thread John D. Ament
Actually I was curious for the code since it seems like he's referencing XML in the error, but sending JSON. On Mon, Feb 24, 2014 at 3:10 PM, Romain Manni-Bucau rmannibu...@gmail.com wrote: cause default provider is using jaxb model so it needs a wrapper. Jackson doesnt. (see jettison) Side

Re: JAX-RS JSON unexpected element

2014-02-24 Thread Romain Manni-Bucau
hehe, jettison is a xml library providing json as output but based on xml logic. Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-02-24 21:14 GMT+01:00 John D. Ament

Re: JAX-RS JSON unexpected element

2014-02-24 Thread José Luis Cetina
@Romain, is jettison bundled with TomEE? 2014-02-24 14:14 GMT-06:00 John D. Ament john.d.am...@gmail.com: Actually I was curious for the code since it seems like he's referencing XML in the error, but sending JSON. On Mon, Feb 24, 2014 at 3:10 PM, Romain Manni-Bucau rmannibu...@gmail.com

Re: JAX-RS JSON unexpected element

2014-02-24 Thread Romain Manni-Bucau
yes it is coming with cxf in jaxrs and plus versions Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-02-24 21:17 GMT+01:00 José Luis Cetina maxtorz...@gmail.com:

Re: JAX-RS JSON unexpected element

2014-02-24 Thread Romain Manni-Bucau
maybe test @xmltransient Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-02-24 21:58 GMT+01:00 José Luis Cetina maxtorz...@gmail.com: @Romain is something like