With the help of spring or blueprint, you can setup your CxfRsEndpoint just like this
<cxf:rsClient id="rsClientProxy" address="http://localhost:${CXFTestSupport.port1}/CxfRsProducerTest/" serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"> <cxf:headers> <entry key="Accept" value="text/xml"/> </cxf:headers> </cxf:rsClient> from(“direct:start”).to(“cxfrs://bean://rsClientProxy”) -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 24, 2014 at 6:11:56 PM, Richa (rsinha2...@gmail.com) wrote: > Hi, > > I have a camel route which makes a GET request to a rest service hosted on > another server. I need to set a header for invoking the rest service. I am > using CxfRsEndpoint in camel for it. > > I think the headers are set in the JAXRSClientFactoryBean. But I am not able > to set the header there. I am able to set the query parameters but not the > headers. > > Can someone please tell me how to set the headers in CxfRsEndpoint? > > Please help me with this problem. > > Thanks, > Richa > Amadeus Software Labs Pvt. Ltd. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Set-rest-service-headers-for-querying-tp5750525.html > > Sent from the Camel - Users mailing list archive at Nabble.com. >