cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <>
Subject Re: why JSONProviderTest.testReadQualifiedCollection()/testReadQualifiedArray() disabled?
Date Tue, 22 Mar 2011 13:20:36 GMT

On Tue, Mar 22, 2011 at 12:31 PM,

> Hi Sergey,
> thanks for the fast patch.
> I will try it on Thursday as I have not the right environment here
> currently.
> ok, thanks

> Also, JAXBElementProvider has a problem regarding lists of primitive types,
> like a list of strings, but I will report in more detail on Thursday, too.
> It's a known restriction and I'm not sure getting it working with
JAXBElementProvider is realistic. May be if we can agree on what it means to

public List<String> getList() {}

then we can do something about it.

> Another major issue:
> As we make extensively use of XmlJavaTypeAdapter, we realized that it is
> good supported in the data classes used for parameters / return values of
> web methods, but the support is not good when directly annotating
> parameters/return value of web methods with XmlJavaTypeAdapter itself:
> * for non-RESTful services, we solved the problem by using JAXB v2.2.2
> (maybe also earlier versions would work, but actually not that version
> delivered with CXF).
> * for RESTful services, XmlJavaTypeAdapter works as expected when applied
> for parameters, with following exceptions:
> **@PathParam refers to the BoundType, and not to the ValueType (so it e.g.
> tries to find a static valueOf() method in the BoundType); this actually
> makes no sense, and I think this bug is caused since the processing of
> PathParam normally not considers JAXB annotations, since JAXB is only one
> possible data binding for REST.

@PathParams refer to individual URI fragments, JAX-RS MessageBodyReaders are
not involved during processing PathParams...

> **Also lists do not work, as XmlJava TypeAdapter should be applied to the
> list items and not to the list object itself (there is no problem with
> non-RESTful services in this regard)
> Sure, this has to be fixed...

> So for the two exceptions, we had to use the ValueType directly in our REST
> methods, and (un)marshal them with the XmlAdapter "by hand".
> Is it possible to contribute some very useful code for testing of RESTful
> services (which should be also useful for non-testing purposes)? Saying
> this, I could provide test cases using this code, showing all of the above
> problems.

Yes, please, if you could provide some test cases then it will help...

Thanks, Sergey

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message