use-x-forwarded-headers in Camel cxfEndpoint in Fuse

Solution Verified - Updated -

Issue

  • We use a cxfEndpoint behind an Apache reverse proxy. We want to use the X-Forwarded-For and X-Forwarded-Proto HTTP-Headers to let cxf generate the the WSDL using the original server name (or IP) and the Protocol. For example the wsdl should look like this:
<wsdl>
...
<xs:include schemaLocation="https://myrealserver.com/ws/mywebservice?xsd=myDefinition.xsd"></xs:include>
...
</wsdl>

instead of

<wsdl>
...
<xs:include schemaLocation="http://localhost:8181/ws/mywebservice?xsd=myDefinition.xsd"></xs:include>
...
</wsdl>

  • There is a flag use-x-forwarded-headers available for the CXFServlet which should fulfil the requirement but we don't know how to pass this flag to the cxfEndpoint ?

Environment

  • Red Hat JBoss Fuse
    • 6.x
  • Apache Camel
    • camel-cxf component

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.