当尝试从浏览器访问WSDL文件(URL为http://10.191.245.96/XXXServer/WorkFlowService?wsdl)时,我能够访问它。但是,当我尝试从java代码访问相同的WSDL文件时,我得到了以下例外:
javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://10.191.245.96/XXXServer/WorkFlowService?wsdl. It failed with:
Connection timed out.
2015-07-02 04:47:26,055 ERROR [STDERR] at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:162)
2015-07-02 04:47:26,055 ERROR [STDERR] at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:144)
2015-07-02 04:47:26,055 ERROR [STDERR] at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:264)
...........
...............
Caused by: java.net.ConnectException: Connection timed out
2015-07-02 04:47:26,063 ERROR [STDERR] at java.net.PlainSocketImpl.socketConnect(Native Method)
2015-07-02 04:47:26,063 ERROR [STDERR] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
2015-07-02 04:47:26,063 ERROR [STDERR] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
2015-07-02 04:47:26,063 ERROR [STDERR] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
.............
..............
如何解决上述问题?