On 29/07/13 13:05, John Baker wrote:
Defining in the XML Is fine. I'm just working out how the compare method
for a method is supposed to work with my example...

What you can do is to do a check in your custom RC on the input stream available on the current message (message.getContent(InputStream.class)), determine the type, restore IS (via message.putContent) and also save the determined type as a message property, ex, message.put("custom.type", Banana.class);


Next your custom MessageBodyReader will get this actual type from the injected MessageContext.get(...) and use it when calling on JAXBElementProvider

May be there is a cleaner way

Sergey


Reply via email to