一个项目中,通过webservice方式调用远程服务器接口,异常代码段:
boolean flagXml = true;
String xmlDate = "";
while (flagXml) {
QName qname = new QName(qn, "GetReport");
Object[] result = client.invokeBlocking(qname,
new Object[] { validation, bid },
new Class[] { String.class });
if (result[0].toString().contains("Message")) {
xmlDate = result[0].toString();
break;
}
}
在一台服务器上部署客户端应用后正常,没有异常,在另一台服务器上部署后测试异常端口号占用:
Caused by: java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_
Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.Socket.bind(Socket.java:565)
at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.create
Socket(ReflectionSocketFactory.java:139)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.c
reateSocket(DefaultProtocolSocketFactory.java:125)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java
:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$Http
ConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Htt
pMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMe
thodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav
a:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav
a:346)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abst
ractHTTPSender.java:542)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.jav
a:189)
... 12 more
org.apache.axis2.AxisFault: Unrecognized Windows Sockets error: 0: JVM_Bind
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.jav
a:193)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessa
geWithCommons(CommonsHTTPTransportSender.java:371)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Com
monsHTTPTransportSender.java:209)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisO
peration.java:401)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(Out
InAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:
163)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:
548)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:
528)
at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServic
eClient.java:102)
at com.occup.message.MessageStaThread.run(MessageStaThread.
java:91)
at java.lang.Thread.run(Thread.java:619)
求指教!
相关解决方案
- web服务 axis2 流入时为null 各位有用过axis2的请帮帮忙
- axis2 发布webservice类 返回值类型为List 有关问题
- Axis2 发布webService的有关问题
- axis webservice 札记 安装eclipse axis2 插件 (links 方式)
- Axis2 webservice 小疑点求解!
- 用java写webservice兑现数据库间数据传输,用tomcat,Axis2,求算法指导和可用函数
- axis2 jar包详解及缺少jar包错误分析
- Axis2-04 WebService中Session的治理
- Axis2 在 WebSphere 7.0中部署的有关问题
- webservice 开发 axis2 简略部署服务
- Axis2 创设 webservice 操作手册
- axis2 webservice入门学识(JS,Java,PHP调用实例源码)
- axis2 WebService eclipse插件上载安装
- Axis2 WebService(配备、发布、调用)
- 使用Apache Axis2 实现Webservice发布
- WebService兑现包-AXIS2
- AXIS2+Websphere开发、支配到发布的经验总结
- axis webservice 札记 安装eclipse axis2 插件 (links 方式)
- [原创]webservice 札记(小结) axis2 集成spring <一>发布服务
- [原创]webservice 札记(小结) axis2 集成spring <二> 调用服务
- [原创]webservice 学习札记,axis2 传递对象数组,非stub方式
- [原创]webservice 札记(小结) axis2 集成spring<三> 传递对象
- axis2 公布webservice
- axis2 在websphere下发布一般有关问题
- 应用Eclipse+Axis2+Tomcat构建Web Services应用(实例讲解篇)
- Java Web 服务: Axis2 中的 JAXB 跟 JAX-WS
- grails框架中webService插件的运用(axis2,cxf)
- web service axis2 参数替对象传递
- Tomcat+Axis2 SSL兑现
- Axis2 关于 Web Serviece 公布