cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From LeszekM <>
Subject CXF how to definie Response Type in Request Header ?
Date Thu, 23 Oct 2008 09:45:10 GMT

I am new to CXF and I am trying to write a CXF Service using JAX RS
Annotations. The problem is, that in this case the type of  Servers's
response (XML/JSON), is defined in Request Header like:
Here is what I have to do:

public Customer getCustomer() {
   if request.header.equals("application/json") return Customer in JSON
   else return Customer in XML format 

I couldn't find the solution neither in Forum nor in CXF samples. And
ProduceMime annotation doesn't seem to work in this case, as only one is

Is there any solution to this problem ?
Leszek Mysliwiec

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message