Hello.
I have a JAX RS service configured like this
<jaxrs:server id="someServer" address="/someAddress">
<jaxrs:serviceBeans>
<ref bean="someEndpoint" />
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jsonProvider" />
</jaxrs:providers>
</jaxrs:server>
The service correctly handles IN and OUT messages and converts them to
objects.
But I have problem with accessing JSON content as a String (raw format). I
need this to correctly implement security as content is needed to calculate
MAC for each message (Message Authentication Code).
I tried to do it like this:
@Context
MessageContext mc;
....
IOUtils.toString(mc.getContent(InputStream.class), "utf-8");
but empty String is returned as input stream has no content (checked on
debug)
On the other hand mc.getContent(String.class) returns null
It is strange as LogginInIntercetor from CXF is using the same technique.
Is there any way to get JSON message content as String ?
Artur
--
View this message in context:
http://cxf.547215.n5.nabble.com/Accessing-JAXRS-JSON-content-directly-tp4390185p4390185.html
Sent from the cxf-user mailing list archive at Nabble.com.