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.

Reply via email to