我正嘗試使用WSDL(https://dpdmsdmmk1.fmr.com:12210/cmis/services/RepositoryService?wsdl)生成(SOAP)Web服務客戶端類,該類在URL中具有HTTPS。在Axis2 Runtime中使用java生成HTTPS wsdl的webservice客戶端
Paste_WSDL_Below:https://dpdmsdmmk1.fmr.com:12210/cmis/services/RepositoryService?wsdl
徑1:從命令提示的wsimport -d C:\用戶\ A550857 \桌面\周杰倫 -extension -keep -p com.gatewayedi.ws -XadditionalHeaders Paste_WSDL_Below
響應在命令提示符:
解析WSDL ...
[錯誤] sun.security.validator.ValidatorException:PKIX路徑建設失敗:蘇n.security.provider.certpath.SunCertPathBu ilderException:無法找到要求的目標的有效驗證路徑
無法讀取WSDL文檔:Paste_WSDL_Below,因爲1)找不到文檔;/2)文件無法讀取; 3)文檔的根元素不是。
[ERROR] failed.noservice =找不到的wsdl:服務中所提供的WSDL(S):
與至少一個服務定義至少一個WSDL需要提供。
無法解析WSDL。
路徑2:從命令提示
{C:\用戶\ A550857 \桌面\周杰倫\軟商品\ axis2-1.6.2 \ BIN> wsdl2java.bat的-uri Paste_WSDL_Below
上命令提示響應:
使用AXIS2_HOME:C:\ Users \ A550857 \ Desktop \ Jay \ Softs \ axis2-1.6.2使用JAVA_HOME:C:\ Program Files文件(x86)\ Java \ jdk1.7.0_03 log4j:WARN沒有appender可以找到記錄器(org.apache.axis2.i18n.Project ResourceBundle)。 log4j:WARN請正確初始化log4j系統。線程「main」中的異常org.apache.axis2.wsdl.codegen.CodeGenerationException:在org.apache.axis2上解析WSDL 時出錯org.apache.axis2.wsdl.codegen.CodeGenerationEngine。(CodeGenerat ionEngine.java:181) .wsdl.WSDL2Code.main(WSDL2Code.java:35) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)導致:javax.net.ssl.SSLHandshakeException:sun.security.validator。驗證器異常:PKIX路徑構建失敗:sun.security.provider.certpath.SunCertPath BuilderException:無法在sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun找到所需目標 的有效證書路徑。 security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1868) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:276) at sun.security.ssl.Handshaker .fatalSE(Handshaker.java:270) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker。 java:1337) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.jav a:154) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:868) at sun.security.ssl.Handshaker sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:998) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1294) at sun.security .ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1321) at sun.security.ssl.SSLSocketImpl。startHandshake(SSLSocketImpl.java:1305) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:523) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java: 185) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon nection.java:1296) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468) at sun.net.www.protocol .https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine。(CodeGenerat ionEngine.java:99) ... 2 more引起者:sun.security.validator .ValidatorException:PKIX路徑構建失敗:sun.security.provider.certpath.SunCertPathBuilderException:無法找到v ali d認證通過sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385) 請求目標 at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.jav a:292) at sun.security。 sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerIm pl.java:231)上的validator.Validator.validate(Validator.java:260) at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.j ava:326) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustMan agerImpl.java:126) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker。 java:1319) ... 15更多由:sun.security.provider.certpath.SunCertPathBuilderException:無法找到有效的證書路徑到要求的目標 在sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCert PathBuilder.java :196) 在java.security.cert.CertPathBuilder.build(CertPathBuilder.java:268) 在sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380) ...... 21更}
我正在使用的環境:Axis2-1.6.2,Java7,WSDL:Paste_WSDL_Bowow
Pl對此建議。我能夠在瀏覽器中查看具有適當內容的WSDL。
任何建議,P1幫助我快速 – Jayanand