Thank you Stephen, your information definitely helps. I am able to work
around the issue this way.
Over the last day, I experimented more with the the classes that I was able
to generate the @XmlRootElement annotation for, but still had issues when
using them as parameters in my REST service method signatures.
I looked closer into the error message I was getting, messages like this:
JAXBException occurred : unexpected element (uri:"", local:"Foo"). Expected
elements are <{http://acme.com/model}Foo>,.....
I noticed that the unexpected element has a namespace of "local" and the
expected element is there, but has a namespace value that came from the XSD.
I performed an experiment by copying "Foo" to a different package with no
other changes other than changes the name to something like Foo2, and the
problem went away.
So this is leading me to believe that my issue is really some sort of
namespace issue. My client will be a javascript client. I am currently
testing with Firefox Poster, with the json object in the request body. The
json object looks like this :
{
"Foo":
{
"name":"bar"
}
}
There is nothing in the client that is specifying a namespace. I've been
told that the client does not specify a namespace for the object.
So I am wondering if there is some sort of filter/interceptor I need to
write or configure in order to match "Foo" with "{http://acme.com/model}Foo"
--
View this message in context:
http://cxf.547215.n5.nabble.com/XMLRootElement-for-parameters-in-REST-method-signatures-tp4537057p4540370.html
Sent from the cxf-user mailing list archive at Nabble.com.