I can confirm CXF test involving this provider passes OK, we have one
test reading into an explicit collection (ex, List<Book>) and I've added
locally another one reading directly into Book, both pass just fine,
which confirms IMHO that as far as CXf is concerned it passes all the
data to Jackson provider correctly
Can you provide a simple Maven based project showing the problem ?
Thanks, Sergey
On 18/01/13 22:00, Sergey Beryozkin wrote:
I'll try to do my own basic read test on Monday to double check that CXF
is working properly with this provider - I do think it is an issue of
mapping in your particular case but I'll double check
Sergey
On 18/01/13 12:44, jbright wrote:
The JacksonJsonProvider is not working with CXF.
CXF v2.6.0
Jackson v2.1.2 (com.fasterxml.jackson)
RESTClient (for testing)
I do have the provider configured like below in beans.xml.
<bean id="jacksonMapper"
class="com.fasterxml.jackson.databind.ObjectMapper">
<property name="dateFormat">
<bean class="java.text.SimpleDateFormat">
<constructor-arg type="java.lang.String"
value="yyyy-MM-dd'T'HH:mm:ss.SSSZ"></constructor-arg>
</bean>
</property>
</bean>
<bean id="jacksonProvider"
class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider">
<property name="mapper" ref="jacksonMapper" />
</bean>
in<jaxrs:server.....>
<jaxrs:providers>
<ref bean="jaxbProvider" />
*<ref bean="jacksonProvider" />*
</jaxrs:providers>
</jaxrs:server>
The application gets deployed without any issues, it gives good JSON
while I
give the request as "application/xml" and the response as
"application/json".
When I try to give JSON in request by setting
Content-Type=application/json
I'm facing the *500 Internal Server Error*
The request is not at all landing in the service implementation class
of my
webservice.
The JSON in request body is :
{"SearchOrdersRequest":{"LoginCredentials":{"AppId":"BookStore","Username":"myuser","Password":"abcd1234","SecurityToken":"Vcvx45YilzX1"},"SearchHeader":{"SearchCategory":"Rep","FilterLogic":"1
AND 2","SearchParams":{"Field":"Order Number
(s)","Operator":"EQUALS","Values":"600045335"}}}}
Any immediate help is appreciated.
I do have a post in the forum of Jackson - json-request-not-processing
<http://jackson-users.ning.com/forum/topics/json-request-not-processing>
--
View this message in context:
http://cxf.547215.n5.nabble.com/JacksonJsonProvider-not-working-with-CXF-Jax-RS-tp5721842.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