If you are working with JAX-WS on JBoss (in my case version 4.2.3.GA) to expose SLSBs as Web Services, you might notice that in the generated WSDL, the end-point address is set as the machine’s name or localhost. The address JBoss uses by default is the ‘bind address’, which you can specify via the -b argument when starting up the container. If you (like me) are specifying it as 0.0.0.0 (which binds it for all interfaces), it generally resolves to the machine name.
This affects a lot if the JBoss instance is published to the web, since we would like to have the WSDL end point mappings via the public IP address. I had this problem for quite a time, and finally managed to find the solution for this in the JBoss Forums. With a slight change in the JBoss configuration, you can get JBoss to use any IP address of your choice in the WSDL.
The steps are as follows:
- Goto deploy/jbossws.sar/jbossws.beans/META-INF
- Edit the jboss-beans.xml file (the file itself is well commented)
- Change the webServiceHost property to the address that you wish to have.