Xfire Nested exception is org.codehaus.xfire.fault.XFireFault:Couldn't send message.

来源:互联网 发布:手机微信炸群软件 编辑:程序博客网 时间:2024/04/28 06:08
org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Couldn't send message.
org.codehaus.xfire.fault.XFireFault: Couldn't send message.
at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:30)

at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.Java:131)


使用xfire制作完webservice 接口时,使用 http://localhost:8080/webservice/services/demo?wsdl 能访问到,

但是在调用的过程中连接不到接口服务器。

后面使用ip访问发现访问不到这个链接。

解决方法:

1. 使用cmd命令netstat -n, 查看tomcat地址绑定, 发现是绑定到::1, IPv6.

2. 配置tomcat的server.xml, 更改connector配置, 端口不用改, 加上address="0.0.0.0", 使其绑定到IPv4, 如下

(借鉴的解决方案)
<1>使用cmd命令netstat -n, 查看tomcat地址绑定, 发现是绑定到::1, IPv6;
<2> 配置tomcat的server.xml, 更改connector配置, 端口不用改, 加上address="0.0.0.0", 使其绑定到IPv4
<Connector port="8080" maxHttpHeaderSize="8192" address="0.0.0.0"maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"connectionTimeout="20000" disableUploadTimeout="true" />
<3>重启tomcat, 再次使用netstat -n, 查看tomcat地址绑定, 已变为IPv4.

此问题即可迎刃而解。

0 0
原创粉丝点击