Hi,
I am new to CXF. With some effort I could get REST webservices working
which consume and produce JSON. Now I am trying to write a client to test
the same. I am using Jackson for JSON and CXF2.5.1. When I try to access the
webservice from the client, tomcat throws this error -
org.apache.cxf.jaxrs.provider.ProviderFactory createProvider
INFO: Problem with setting the default provider
org.apache.cxf.jaxrs.provider.JSONProviderorg/codehaus/jettison/mapped/TypeConverter
I understand from the error that I need to configure Jackson as the JSON
provider. I am using a simple servlet for the client, no spring and do not
understand how I can configure Jackson as the JSON provider in code. Here's
what I try to do :
XXXManager mgr =
JAXRSClientFactory.create("http://localhost:8080/XXXService/rest/XXXService",
XXXManager.class);
try {
//create JSON object to pass to webservice
SearchRequest req = .....
SearchResponse resp = mgr.SearchXXX(req);
}
catch(ServerWebApplicationException ex)
{
Response r = ex.getResponse();
String message = ex.getMessage();
}
Here both SearchRequest and SearchResponse are annotated with
@XmlRootElement
Any help will be appreciated.
kind regards,
sj
--
View this message in context:
http://cxf.547215.n5.nabble.com/Configuring-Jackson-as-JSON-provider-in-JAX-RS-client-tp5480793p5480793.html
Sent from the cxf-user mailing list archive at Nabble.com.