camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: camel restlet : Accept header
Date Tue, 08 May 2012 09:24:38 GMT
On Tue, May 8, 2012 at 9:47 AM, pchakinala
<praveen.chakinala@planetsoft.com> wrote:
> Hi ,
>  We have restful service developed with CXF. Now we are planning to consume
> it using camel-restlet component. We are setting below headers to return
> response message in XML format.
>
> Camel client  Processor code:
>
>  exchange.getIn().getHeaders().put("Content-Type", "application/xml");
>  exchange.getIn().getHeaders().put("Accept", "application/xml");
>
>
>  <to
> uri="restlet:http://localhost:8081/pss-ui-2.0.0/api/rest/pssrestservices/findPartyById/{restParam}?restletMethod=get"/>
>
> However after setting the headers also we got response in json format
> instead of xml.
>

Do the CXF service see this header on the server side? eg the header
need to be sent over the wire, and the server must check this header
so it knows what the client can accept as response, and react
accordingly.

And as always its useful to tell us which versions of the products you
use. And you can try upgrading to newer releases to see if it fixes
your issues.


>
> Please update me  is there any other way to set the Accept parameter in the
> Restlet request header.
>
> Regards,
> pchakinala
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-restlet-Accept-header-tp5692917.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message