I have two servlets, A the CXF servlet can receive and respond to
RESTful HTTP calls using JAXB beans.  Servlet B (on a different machine)
is not using CXF but it makes calls to servlet A providing a URL and
user credentials.  At some point in time servlet A will send data to
Servlet B using the provided URL and credentials.  This is working well
but does not support JSON because the message from Servlet A to Servlet
B is not a JAX-RS message.  I would like to be able to use the CXF jars
in servlet A to create a XML or JSON message from my JAXB bean.  It
would appear that I need to create a CXF marshaler and call the
MessageBodyWriter.  Right now I am using the JAXB marshaller and it does
not appear to produce JSON.

 

Can anyone offer a good solution to this?

 

Jon Willard



 

Reply via email to