Hi all.

How do I set response headers when implementing REST using the CXFRS
component.  I am new and learning camel by developing a small bundle for my
own use.  I have developed services which return XML (from the exchange
body) when the requests cannot be serviced I use the class
javax.ws.rs.core.Response to return a status code.  All working, followed
example as http://camel.apache.org/cxfrs.html.

Using the Response / ResponseBuilder classes I can set headers in the http
response when in error, but my question is  how do I do this when returning
a successful payload. i.e status 200 with the XML in the body i.e.
exchange.getOut().setBody(bookResource).  Following the principles of REST
it is quite common to set the response Location: and Content-Location:
headers in the URL of the resource.

Any ideas - loving camel/EIP,

Rango.

Reply via email to