I recently implemented the JAX-RS Rest service. I created a JIBX provider that allows you to decouple and sort between XML and Java types. I would also like to indicate the version of my service by specifying the version in the URL. Versions will include the message binding version used to marshal and untie Java types.
Therefore, it is necessary that the version be passed to the JIBX manufacturer and therefore the URL containing the version. However, the provider interfaces ( MessageBodyWriterand MessageBodyReader) do not provide the URI path in their methods interface.
The following is the method signature writeTo()for the interface MessageBodyWriter:
writeTo(Object, Type, Annotation[], MediaType, MultivaluedMap, OutputStream)
This method parameter does not contain the uri path, so the jibx custom provider cannot know which version of the message binding it should use for Java-type marshalling. Is there any way around this?
source
share