Web 服务在 SOAP 中显示本地主机而不是 IP
web service show localhost not IP in SOAP
I 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 而不是 10.10.9.151.Can 有人给我一些建议在哪里检查原因吗?谢谢
问题出在您的绑定地址上。默认情况下,public
接口配置为侦听 127.0.0.1 的环回地址。因此,如果您以以下方式启动 WildFly:./bin/standalone.sh
然后WildFly默认页面可以访问为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是访问所有应用程序的HTTP端口。
在多宿主计算机上,您可能希望启动 WildFly 并将 public
接口绑定到特定的 IP 地址。这可以很容易地完成:
./bin/standalone.sh -b=10.10.9.151 //your server ip
现在可以在 http://10.10.9.151:8080.
访问应用程序
有关详细信息,请参阅以下链接:
问题出在您的绑定地址上。默认情况下,public
接口配置为侦听 127.0.0.1 的环回地址。因此,如果您以以下方式启动 WildFly:./bin/standalone.sh
然后WildFly默认页面可以访问为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是访问所有应用程序的HTTP端口。
在多宿主计算机上,您可能希望启动 WildFly 并将 public
接口绑定到特定的 IP 地址。这可以很容易地完成:
./bin/standalone.sh -b=10.10.9.151 //your server ip
现在可以在 http://10.10.9.151:8080.
访问应用程序有关详细信息,请参阅以下链接: