camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: cxfrs response headers
Date Tue, 23 Aug 2011 07:49:23 GMT

With the help of Reponse/ ResponseBuilder, you can build the response 
for the bookResource like this

  Response r = 

On 8/23/11 2:22 AM, bird bird wrote:
> 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
> to return a status code.  All working, followed
> example as
> 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.

Blog: (English)
Twitter: willemjiang
Weibo: willemjiang

View raw message