Assuming your IDE allows you to (I use Eclipse) set a breakpoint to catch
org.codehaus.jackson.map.exc.UnrecognizedPropertyException and see if it gives
you any more insight... That's how I discovered what I had done wrong. I
inspected the variables in the stack until I found what the deserializer
thought were valid values and that clued me into the true issue.
I found this for myself in the org.codehaus.jackson.map.ObjectMapper class
where the JsonDeserializer was created. For cxf 2.5.1 the code looks like this:
JsonDeserializer<Object> deser = _findRootDeserializer(cfg,
valueType);
For me this yeilded a org.codehaus.jackson.map.deser.BeanDeserializer
instance... If you look then at the deser instance and inspect it it had a
BeanPropertyMap called _beanProperties which has a private _buckets
attribute... In there if you look at the BeanPropertyMap$Bucket entries the
'key' will be a valid token you can pass in...
That's the best I can do for you... When I looked in there as to what the
'settable values' were - it was obvious to me that I had simply goofed up the
json...
Good luck, I tried :)
-----Original Message-----
From: jbright [mailto:[email protected]]
Sent: Thursday, January 24, 2013 8:16 AM
To: [email protected]
Subject: Re: JacksonJsonProvider not working with CXF Jax-RS
I remember I tried that and still it gave me 500 error
John
On Jan 24, 2013, at 6:18 PM, "Clint Dovholuk [via CXF]"
<[email protected]> wrote:
> I think you have the same issue I had - the 'searchMeRequest' is the object
> as defined in your service right?
>
> public SearchResult searchForIt(SearchMeRequest searchMeRequest)
>
> If that's the case then your json is invalid. It needs to take that outter
> 'wrapper' element out...
>
> I think your json needs to look like this... give this a try:
>
> {
> "loginCredentials":{
> "appId":"J",
> "username":"J",
> "password":"J",
> "securityToken":"J"
> },
> "searchHeader":{
> "searchCategory":"J",
> "filterLogic":"J",
> "searchParams":{
> "field":"J",
> "dataType":"J",
> "operator":"J",
> "values":"J"
> }
> }
> }
>
>
> -----Original Message-----
> From: jbright [mailto:[hidden email]]
> Sent: Thursday, January 24, 2013 1:43 AM
> To: [hidden email]
> Subject: RE: JacksonJsonProvider not working with CXF Jax-RS
>
> yep, I did know that and I tried as mentioned by you.. but still there is no
> luck..
>
> I even tried the way it have the case sensitiveness... like below
>
> {"searchMeRequest":{"loginCredentials":{"appId":"J","username":"J","pa
> ssword":"J","securityToken":"J"},"searchHeader":{"searchCategory":"J",
> "filterLogic":"J","searchParams":{"field":"J","dataType":"J","operator
> ":"J","values":"J"}}}}
>
> Still no luck..
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/JacksonJsonProvider-not-working-with-C
> XF-Jax-RS-tp5721842p5722114.html Sent from the cxf-user mailing list
> archive at Nabble.com.
>
>
> If you reply to this email, your message will be added to the discussion
> below:
> http://cxf.547215.n5.nabble.com/JacksonJsonProvider-not-working-with-C
> XF-Jax-RS-tp5721842p5722130.html To unsubscribe from
> JacksonJsonProvider not working with CXF Jax-RS, click here.
> NAML
--
View this message in context:
http://cxf.547215.n5.nabble.com/JacksonJsonProvider-not-working-with-CXF-Jax-RS-tp5721842p5722134.html
Sent from the cxf-user mailing list archive at Nabble.com.