WSDL URL可以从浏览器访问,但不能从java程序访问

时间:2017-03-24 16:57:07

标签: java web-services ssl proxy wsdl

我有一个在远程服务器上运行的Web服务,我编写了一个客户端程序来使用它的服务。客户端程序使用使用wsimport命令从.wsdl文件生成的客户端存根。我通过代理访问服务器,在我的程序中,我通过设置系统属性" proxySet"," proxyPort"告诉JVM通过代理进行通信。和" proxyHost",为true,分别对应代理的端口和地址;哪个工作正常。此外,我还通过SSL连接,服务器证书由其他一些CA签名,在我的情况下,我需要将证书导入到trustore cacerts;这也很好。但是,我无法使用我在程序中指定的URL访问Web服务,尽管可以使用浏览器访问它。下面是我的程序的堆栈跟踪:

    com.sun.xml.internal.ws.wsdl.parser.InaccessibleWSDLException: 2 counts of InaccessibleWSDLException.

    java.io.IOException: Server returned HTTP response code: 500 for URL:     https://webservicesimp.companyName.com/ReportingService
    java.io.FileNotFoundException: https://webservicesimp.companyName.com/ReportingService?wsdl

at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(Unknown Source)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(Unknown Source)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(Unknown Source)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown Source)
at javax.xml.ws.Service.<init>(Unknown Source)
at com.conpanyName.xml.companyName.enterprise.report.v1.enterprisereportingservice_1.ReportingService.<init>(ReportingService.java:50)
at WebServices.<init>(WebServices.java:33)
at ERSWebServiceRunner.main(ERSWebServiceRunner.java:37)

感谢任何帮助......谢谢

0 个答案:

没有答案