Hi
On Fri, Jul 1, 2011 at 7:49 PM, dponos <[email protected]> wrote:
>
> Sergey Beryozkin-5 wrote:
>>
>> Forgot to mention that in earlier CXF versions one can get the same
>> transformation done by explicitly configuring JSON or JAXB providers:
>>
>> http://cxf.apache.org/docs/jax-rs-data-bindings.html#JAX-RSDataBindings-CustomizingJAXBXMLandJSONinputandoutput
>>
>>
>
> Thanks for your replies Sergey. All the information you posted helps me a
> lot.
>
> I'm not using version 2.4 yet, but I was able to successfully get past the
> error by configuring my JSONProvider with the transformation.
>
> I can't declare total victory yet because the fields for the object are not
> getting populated and I wind up with an empty Foo object in my REST service
> method.
>
I suspect it's because Foo schema is actually setting an
elementFormQualified attribute to true.
So, even though we bypassed an initial JAXB error, the actual Foo
children in the incoming sequence are still expected to be qualified
but this time JAXB just ignores them.
So, instead of configuring TransformFeature's inTransformElements with
"Foo" : "{http://somevalue}Foo"
try
"*" : "{http://somevalue}*"
which reads as "qualify all the incoming elements with
http://somevalue namespace"
HTH,
Sergey
> I've been stepping through code to find out why the fields of Foo aren't
> getting set. I noticed that in the UnmarshallingContext, there is an
> "expectText()" method that is returning false. It is returning false
> because the loader is an instance of Discarder.
>
> When I step through the same code for a non-generated class that I don't
> have to transform the incoming namespace for, the loader is an instance of
> LeafPropertyLoader.
>
> So I am currently trying to find out how the loader gets assigned. If I can
> get passed this issue, I think my problem will be completely solved.
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/XMLRootElement-for-parameters-in-REST-method-signatures-tp4537057p4542987.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
--
Sergey Beryozkin
Application Integration Division of Talend
http://sberyozkin.blogspot.com