18 September 2013

Camel cxfEndpoint not only for localhost

Bambitroll @ 16:51
Here is how to define a camel cxfEndpoint, as described in this example page:

<cxf:cxfEndpoint id="soapMessageEndpoint"
                 serviceClass="org.apache.camel.example.cxf.provider.GreeterProvider"
                 address="http://localhost:{{port}}/GreeterContext/SOAPMessageService"
                 wsdlURL="wsdl/hello_world.wsdl"
                 endpointName="s:SoapOverHttpRouter"
                 serviceName="s:SOAPService"
                 xmlns:s="http://apache.org/hello_world_soap_http"/>

But this exposes your web service endpoint only to your localhost, aka you can access it only from the machine running FuseESB (if this is where your route is deployed).
In order to be able to access it from anywhere, use 0.0.0.0 instead of localhost in the address property.