Hi Jersey developers,
The JAX-WS spec is great and simplifies the development of REST
services.
I have a question regarding registering custom providers. I have
created a JIBX provider that allows one to unmarshal and marshall
between XML and Java types. I would like to also version my service
by specifying the version in the URL path. Versioning would include
the version of message binding used to marshal and unmarshall the Java
types. Therefore, it is necessary that the custom JIBX provider is
passed the version, and therefore the URL path that contains the
version, to be passed to the provider when marshalling or
unmarshalling. However, the Provider interfaces (MessageBodyWriter
and MessageBodyReader) do not provide these parameters to the methods.
The following is the method signature of the writeTo() method of the
MessageBodyWriter interface:
writeTo(Object, Type, Annotation[], MediaType, MultivaluedMap,
OutputStream)
This method parameters does not contain the path uri, therefore, the
custom jibx provider cannot know which message binding version it
should use to marshall the Java type. Is there a way around this? Is
it possible we could update the API to include the Path URL.
Your help is greatly appreciated.
Thanks,
mark
Tan, Mark
mark.tan_at_mlb.com
phone: 212-485-4503
cell: 973-943-1224
aim: markjtan4
**********************************************************
MLB.com: Where Baseball is Always On