Hi which version of tomee?
by default next tomee will use johnzon for json but tomee 1 used jettison which is not that easy in practise - relies a lot on jaxb. Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> 2015-07-23 11:31 GMT-07:00 sgjava <[email protected]>: > I'm building a stand alone JSON test client (not embedded TomEE) with > javax.ws.rs.client.Client instead of CXF WebClient and I get > org.apache.cxf.interceptor.Fault: No message body writer has been found for > class com.bhn.services.dto.VersionDto, ContentType: application/json. The > way I fixed this is to add the following test scoped dependencies: > > <dependency> > <groupId>org.codehaus.jackson</groupId> > <artifactId>jackson-jaxrs</artifactId> > <version>1.9.13</version> > <scope>test</scope> > </dependency> > <dependency> > <groupId>org.codehaus.jackson</groupId> > <artifactId>jackson-xc</artifactId> > <version>1.9.13</version> > <scope>test</scope> > </dependency> > > Then you need to add client.register(JacksonJaxbJsonProvider.class). My > question is there a way to use the existing TomEE dependencies, but maybe a > different provider class, so I don't have to explicitly add Jackson > dependencies? > > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/JSON-JAX-RS-test-client-provider-tp4675582.html > Sent from the TomEE Users mailing list archive at Nabble.com. >
