Hi
On 12/01/12 19:33, hdave wrote:
I have the beginnings of a REST API that has resources that can be returned
as either the application/xml or application/json media types.  I've used
the JAX-B annotation "@XMLSchema" in my package-info.java files to ensure
that the appropriate namespace is referenced when responding with an XML
payload.

I also understand that I can generate and XML Schema document based my JAX-B
annotations.  However, is it common practice to also have the payload
reference the XML Schema (e.g. via "xsi:schemaLocation")?  I ask because as
my system evolves and the JAX-B annotations change, I'll need to version the
schema, yes?


I think including an xsi:schemaLocation in the actual representations is very rare and is mainly needed for the generic consumers (such as an Excel Web query plugin or similar) who may need to know how to properly render a given XML payload. The specific clients need to have an a priori knowledge of the data

Cheers, Sergey

--
View this message in context: 
http://cxf.547215.n5.nabble.com/XML-Schema-and-REST-tp5140807p5140807.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to