2014-12-05 41 views
2

我面臨同樣的問題,這傢伙在這裏:的wsimport使用特殊字符和Xauthfile

wsimport Xauthfile error

因爲他沒有給予了反饋,我是新來的能不問他是否解決了他的問題,我正在開一個新的問題。

我使用的是Ubuntu,並從安裝的java oracle安裝了JDK7。

我正在使用第三方Web服務。 Web服務的密碼(... GT @#ED ...)具有與de-Xauthfile語法(http [s]:// user:password @ host:port //)相沖突的字符,因爲「@ 」。點(...)表示我的密碼的其餘部分。

這裏是我運行命令:

wsimport -p loa -Xauthfile "path_to_auth.txt" https://myWS?wsdl 

在我auth.txt文件我有:

https://user:[email protected]#[email protected]?wsdl 

在回報得到

parsing WSDL...  
[ERROR] Server returned HTTP response code: 401 for URL: https://myWS?wsdl, 
"https://myWS?wsdl" needs authorization, please provide authorization file with 
read access at /home/user_name/.metro/auth or use -Xauthfile to give the 
authorization file and on each line provide authorization information using this 
format : http[s]://user:[email protected]:port//<url-path> 

我所有的搜索在網上,但沒有成功。

當我嘗試導入使用了SoapUI的WS想在這個tutorial我得到了

[ERROR] sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid 
certification path to requested target 

,我不知道在哪裏可以指定了SoapUI的SSL文件。我在

喜好tryed - > SSL設置

,但沒有運氣。

就是這樣。我會補充任何幫助。

編輯

OK,所以我通過授權,改變使用HTML URL Encoding Reference的人物,但現在我發現了以下錯誤

[ERROR] Server redirected too many times (20), "https://ws?wsdl" needs 
authorization, please provide authorization file with read access at /home/user 
/.metro/auth or use -Xauthfile to give the authorization file and on each line 
provide authorization information using this format : 
http[s]://user:[email protected]:port//<url-path> 

回答

-1

首先創建auth.txt文件,其中您需要將以下內容保存到C驅動器中:

http://username:[email protected]:port/wsdlurl 

現在運行以下命令:

wsimport -Xauthfile C:\auth.txt -keep http://example.com/test?wsdl 

這對我有效。