I have a route that defines a CXFRS endpoint. I need to retrieve custom HTTP
header values from the inbound request...
from(CXF_RS_ENDPOINT_URI)
.process(new Processor() {
public void process(Exchange exchange) throws Exception
{
Message inMessage = exchange.getIn();
System.out.println("headers->" +
inMessage.getHeaders());
...
here is my unit test code to simulate a client request...
HttpGet get = new
HttpGet("http://localhost:9000/rest/customerservice/customers/126");
get.addHeader("myHeader", "1234");
HttpClient httpclient = new DefaultHttpClient();
HttpResponse response = httpclient.execute(get);
The problem is that the custom header "myHeader" is unavailable from my
route. Is there another way to get to it?
>From looking at the camel-cxf source code, I can see that the default header
strategy/binding logic only sets up predefined HTTP headers. Is there a
reason why other headers aren't passed through as well?
Either way, what is the best approach to override this behavior?
thanks
-----
Ben O'Day
--
View this message in context:
http://camel.465427.n5.nabble.com/camel-cxfrs-with-custom-http-headers-tp2636965p2636965.html
Sent from the Camel - Users mailing list archive at Nabble.com.