2010-07-22 69 views
4

我有這樣的消息如何獲得一個SOAP錯誤消息是WS-I合規

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> 
    <soapenv:Body> 
    <soapenv:Fault> 
     <faultcode>soapenv:Server</faultcode> 
     <faultstring>LOGIN-ERR:Incorrect password - user could not be logged in.</faultstring> 
     </soapenv:Fault> 
    </soapenv:Body> 
    </soapenv:Envelope> 

架構驗證罰款,但SOAP UI工具,當點擊「檢查WS-I合規「,它會使BP1305斷言失敗時失敗。我找不到什麼1305,這是詳細消息

Result 
    failed 
    Failure Detail Message 
    HTTP/1.1 200 OK 
    Transfer-Encoding: chunked 
    Date: Thu, 22 Jul 2010 20:41:43 GMT 
    Set-Cookie: JSESSIONID=C9D19FE6AAD89DFCB6BA9FE196E08D40; Path=/ 
    Content-Type: text/xml;charset=utf-8 
    Server: Apache-Coyote/1.1 
Element Location: 
     lineNumber=26 

回答

3

的問題似乎是,你是返回一個SOAP錯誤消息,但爲200的HTTP狀態代碼,需要SOAP錯誤與HTTP狀態代碼發送的500.

+0

你是對的,我已經解決了,但忘了發佈答案,這正是它是什麼。 – wsxedc 2010-08-19 04:59:39

0

你缺少你的錯誤消息的細節元素。如果wsdl錯誤是由於請求中正文元素的內容而產生的,則這是一個必需的元素

消息應該是這樣的(細節元素應該包含應用程序特定的信息,但可以爲空。不能接受的丟失):

<soapenv:Fault> 
    <faultcode>soapenv:Server</faultcode> 
    <faultstring>LOGIN-ERR:Incorrect password - user could not be logged in.</faultstring> 
    <detail></detail> 
    </soapenv:Fault> 
+0

不,仍然說這是WS-I不合規。 – wsxedc 2010-07-22 21:47:08