调用web service接口,同样的代码,在windows服务器上正常,在Linux服务器上出错

你们都是坏人 2018-03-07 03:09:52
出错信息如下:

HTTP Status 500 - Failed to access the WSDL at: http://xx.xx.xx.cn/flfw-fw/webservice/test?wsdl. It failed with:
type Exception report

message Failed to access the WSDL at: http://xx.xx.xx.cn/flfw-fw/webservice/test?wsdl. It failed with:

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://xx.xx.xx.cn/flfw-fw/webservice/test?wsdl. It failed with:
Got xx.xx.xx.cn while opening stream from http://xx.xx.xx.cn/flfw-fw/webservice/test?wsdl.
com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:173)
com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:155)
com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:120)
com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:258)
com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:221)
com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:169)
com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:101)
javax.xml.ws.Service.<init>(Service.java:77)
javax.xml.ws.Service.create(Service.java:707)
gz.doGet(gz.java:54)
javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause

java.io.IOException: Got xx.xx.xx.cn while opening stream from http://xx.xx.xx.cn/flfw-fw/webservice/test?wsdl
com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:842)
com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:283)
com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:140)
com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:120)
com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:258)
com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:221)
com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:169)
com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:101)
javax.xml.ws.Service.<init>(Service.java:77)
javax.xml.ws.Service.create(Service.java:707)
gz.doGet(gz.java:54)
javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause

java.net.UnknownHostException: xx.xx.xx.cn
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
java.net.Socket.connect(Socket.java:579)
java.net.Socket.connect(Socket.java:528)
sun.net.NetworkClient.doConnect(NetworkClient.java:180)
sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
sun.net.www.http.HttpClient.New(HttpClient.java:308)
sun.net.www.http.HttpClient.New(HttpClient.java:326)
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:997)
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:933)
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:851)
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
java.net.URL.openStream(URL.java:1037)
com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:827)
com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:283)
com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:140)
com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:120)
com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:258)
com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:221)
com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:169)
com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:101)
javax.xml.ws.Service.<init>(Service.java:77)
javax.xml.ws.Service.create(Service.java:707)
gz.doGet(gz.java:54)
javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.84 logs.
...全文
1367 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
你们都是坏人 2018-03-09
  • 打赏
  • 举报
回复
引用 1 楼 u011594442 的回复:
主机地址错了?
地址没有错,同样的代码,一个是windows下,一个在linux下。
你们都是坏人 2018-03-09
  • 打赏
  • 举报
回复
引用 4 楼 x2570799116 的回复:
遇到过,因为jdk版本问题,出现500的情况。
应该不是jdk版本的问题,jdk版本一致。
你们都是坏人 2018-03-09
  • 打赏
  • 举报
回复
引用 2 楼 oyljerry 的回复:
Linux服务器上端口没有开放,不能访问到
引用 3 楼 xiaoduan5267 的回复:
在linux系统上ping下wsdl服务的地址,telnet一下wsdl服务的地址,端口
在linux系统下可以 wget wsdl服务的地址,wsdl服务不让ping的。。 应该不是 这个问题啊。
你们都是坏人 2018-03-09
  • 打赏
  • 举报
回复
引用 10 楼 u011594442 的回复:
[quote=引用 9 楼 xinhao_ 的回复:] [quote=引用 8 楼 u011594442 的回复:] [quote=引用 7 楼 xinhao_ 的回复:] [quote=引用 1 楼 u011594442 的回复:] 主机地址错了?
地址没有错,同样的代码,一个是windows下,一个在linux下。[/quote] 你地址是怎么写的,ip还是域名呢~[/quote] 域名,我用网上的 天气接口测试 也是同样的问题。 http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl 我 怀疑是 Linux 服务器设置的问题。。。[/quote] 那估计是吧。。找个运维来问问,我没在linux上试过~[/quote] 公司没有运维啊,
Sunyiban 2018-03-09
  • 打赏
  • 举报
回复
引用 9 楼 xinhao_ 的回复:
[quote=引用 8 楼 u011594442 的回复:] [quote=引用 7 楼 xinhao_ 的回复:] [quote=引用 1 楼 u011594442 的回复:] 主机地址错了?
地址没有错,同样的代码,一个是windows下,一个在linux下。[/quote] 你地址是怎么写的,ip还是域名呢~[/quote] 域名,我用网上的 天气接口测试 也是同样的问题。 http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl 我 怀疑是 Linux 服务器设置的问题。。。[/quote] 那估计是吧。。找个运维来问问,我没在linux上试过~
你们都是坏人 2018-03-09
  • 打赏
  • 举报
回复
引用 8 楼 u011594442 的回复:
[quote=引用 7 楼 xinhao_ 的回复:] [quote=引用 1 楼 u011594442 的回复:] 主机地址错了?
地址没有错,同样的代码,一个是windows下,一个在linux下。[/quote] 你地址是怎么写的,ip还是域名呢~[/quote] 域名,我用网上的 天气接口测试 也是同样的问题。 http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl 我 怀疑是 Linux 服务器设置的问题。。。
Sunyiban 2018-03-09
  • 打赏
  • 举报
回复
引用 7 楼 xinhao_ 的回复:
[quote=引用 1 楼 u011594442 的回复:] 主机地址错了?
地址没有错,同样的代码,一个是windows下,一个在linux下。[/quote] 你地址是怎么写的,ip还是域名呢~
  • 打赏
  • 举报
回复
遇到过,因为jdk版本问题,出现500的情况。
Miracle1216 2018-03-08
  • 打赏
  • 举报
回复
在linux系统上ping下wsdl服务的地址,telnet一下wsdl服务的地址,端口
oyljerry 2018-03-07
  • 打赏
  • 举报
回复
Linux服务器上端口没有开放,不能访问到
Sunyiban 2018-03-07
  • 打赏
  • 举报
回复
主机地址错了?

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧