2010-10-23 147 views
2

我們已經在Weblogic 10.3上實現了Web服務。使用SOAP UI測試Weblogic Web服務

我想使用SOAP UI客戶端(soapui.org)測試webservices。

,但我得到以下錯誤消息:

Error 401--Unauthorized

Error 401--Unauthorized

From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:

10.4.2 401 Unauthorized

The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.46) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity MAY include relevant diagnostic information. HTTP access authentication is explained in section 11.

,如果我需要做SOAP UI特殊配置的任何想法。

更新: 以下Zeger的意見之後,我做了基本的認證,即設置的用戶名和pwd(的WebLogic/weblogic的)到標題SOAP請求(在SOAP UI)的。但是現在我得到以下錯誤:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Body> <env:Fault xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <faultcode>wsse:InvalidSecurity</faultcode> <faultstring>Error codes: 1061 2661 1028 Error code:1061</faultstring> </env:Fault> </env:Body> </env:Envelope> 

回答

2

您的webservice需要身份驗證。因此,如果您想使用SOAP UI測試此服務,則需要使用HTTP標頭傳遞證書(設置標頭的選項位於SOAPUI的低端)。

閱讀this更多詳情。

+0

我的確輸入了默認的用戶名和密碼(weblogic/weblogic),但現在我收到以下錯誤消息: – rohit 2010-10-23 04:51:45

+0

的wsse:InvalidSecurity 錯誤代碼:1061 2661 1028錯誤代碼:1061 rohit 2010-10-23 04:52:30

+0

可否請您更新上述錯誤的問題,這不是 – zengr 2010-10-23 04:54:11

3

可能爲時已晚,以幫助原來的問題,但是這可能幫助人誰到這兒來自同一個谷歌搜索的我:)

看看http://download.oracle.com/docs/cd/E12840_01/wls/docs103/security/thin_client.html#understanding_basic_atn

默認情況下,當Weblogic收到帶有「Authorization = Basic ...」標頭的HTTP請求時,它會檢查提供的憑據。由於您幾乎可以肯定沒有爲Weblogic配置任何安全領域或用戶,您將獲得401回。

0

+ markl具有爲何究竟是什麼在他的回答發生......然而在SOAP UI解決這個問題,你會做以下幾點:

文件 - >首選項 - > HTTP設置

取消選中「添加驗證信息到外發請求」這個框,這將允許SOAPUI左下框中的「TestRequest屬性」僅填充請求頭,而不是「基本授權」。

如果你想保存這些設置,保存參數:

文件 - >保存首

上述指令是soapUI的4.0.1(但我想它適用於所有版本)