Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the asciidoc in the repository:

How can I get the remote connection IP address from the camel-cxf consumer ?

From Camel 2.6.0, you can access the CXF Message by using the key of CamelCxfMessage from message header, and you can get the ServletRequest instance from the CXF message, then you can get the remote connection IP easily.

Here is the code snippet:

 // check the remote IP from the CXF Message
 org.apache.cxf.message.Message cxfMessage = exchange.getIn().getHeader(CxfConstants.CAMEL_CXF_MESSAGE, org.apache.cxf.message.Message.class);
 ServletRequest request = (ServletRequest) cxfMessage.get("HTTP.REQUEST");
 String remoteAddress = request.getRemoteAddr();
© 2004-2015 The Apache Software Foundation.
Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram