The soap address in the WSDL generated by the CXF-BC component uses localhost instead of the machine's hostname.

Solution Verified - Updated -

Environment

  • Fuse ESB all versions.

Issue

The soap address in the WSDL generated by the CXF BC uses localhost instead of the machine's hostname.

How to get the machines hostname/IP address in the WSDL generated at runtime by the CXF BC?

Resolution

The hostname or IP address used in the runtime-generated WSDL depends on what URL is used to access the wsdl. Using the cxf-wsdl-first demo as an example a URL like

http://localhost:8092/PersonService/?wsdl

to access the WSDL will yield a soap address like

http://localhost:8092/PersonService/

whereas a URL like:

http://192.168.1.1:8092/PersonService/?wsdl

will yield a soap address like:

http://192.168.1.1:8092/PersonService/

where 192.168.1.1 is the IP address of the machine that ServiceMix is running on.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments