Search code examples
web-servicesjbosswildfly

web service show localhost not IP in SOAP


enter image description hereI created a web service named WildflyTest and a method called HelloWorld and deployed it to my wildfly 11 server,the server ip is 10.10.9.151.I tried to test using SoapUI, and I can open the wsdl address http://10.10.9.151:8086/WildflyTest/HelloWorld?wsdl. But when I tested it in SOAP Ui, when I created a new request, the address is http://localhost:8086/WildflyTest instead of 10.10.9.151.Can anyone give me some suggestion where to check the reason? Thx.


Solution

  • The issue is with your bind address. By default, public interface is configured to listen on the loopback address of 127.0.0.1. So if you start WildFly as: ./bin/standalone.sh

    Then the WildFly default page can be accessed as http://127.0.0.1:8080. Usually, /etc/hosts provide a mapping of 127.0.0.1 to localhost, and so the same page is accessible at http://localhost:8080. 8080 is the HTTP port where all applications are accessed.

    On a multihomed machine, you may like to start WildFly and bind public interface to a specific IP address. This can be easily done as:

    ./bin/standalone.sh -b=10.10.9.151 //your server ip
    

    Now the applications can be accessed at http://10.10.9.151:8080.

    Refer following links for more info:

    Bind WildFly to a different IP address

    How to configure JBoss to bind to a different IP ?