grails中的SOAP Web服务URL

时间:2014-01-21 16:24:07

标签: grails

我正在开发一个grails webapp并使用SOAP来使用

发布我的Web服务
Endpoint.publish("http://localhost:8080/XYZ", new XYZ());

当我从本地计算机访问此服务时,它工作正常但当我尝试使用我的机器IP地址而不是localhost通过不同的计算机访问它时,它没有显示任何内容。

我也允许端口通过防火墙,但仍然没有成功。

谁能告诉我原因以及如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

默认情况下,嵌入式tomcat服务器将侦听localhost。您必须将其显式绑定到IP地址。

试试这个,看看是否有效

$grails -Dserver.host=192.168.1.100 run-app

或者

    $grails -Dserver.host=192.168.1.100 run-war