Hi,
Why do you want to the custom http headers from the CXFRS endpoint?
The DefaultCXFRSBinding is just copying the Http protocol related header
into camel message.
I think we make some changes here and pass the protocol headers into the
camel message header.
I filled a JIRA[1] for it.
[1] https://issues.apache.org/activemq/browse/CAMEL-3057
Willem
boday wrote:
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