'不明白'必须理解'SoapUI 响应中的标头错误 [英] 'Did not understand "MustUnderstand" header(s)' Error in SoapUI Response

查看:37
本文介绍了'不明白'必须理解'SoapUI 响应中的标头错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 SoapUI 对网络服务进行自动化测试.当我向服务器发送请求时,测试应该自动化,我总是得到以下响应:

Im trying to use SoapUI for automated tests of a webservice. When I send the request form the server where the test should be automated, I always get the following response:

---------------- Request ---------------------------
Request Headers: Authorization : Basic 
Host : domino.auto-partner.net
Content-Length : 1286
SOAPAction : "RETURNRESPONSE"
Accept-Encoding : gzip,deflate
User-Agent : Apache-HttpClient/4.1.1 (java 1.5)
Connection : Keep-Alive
Content-Type : text/xml;charset=UTF-8


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:DefaultNamespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:RETURNRESPONSE soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <XDBREPID>C125724100348230</XDBREPID>
         <XDOCID>23EECD26930551E0C125759B004A802C</XDOCID>
         <XCHGID>CRQ000000012811</XCHGID>
      </urn:RETURNRESPONSE>
   </soapenv:Body>
</soapenv:Envelope>

---------------- Response --------------------------
Response Headers: Date : Wed, 17 Jul 2013 10:44:39 GMT
#status# : HTTP/1.1 200 OK
Content-Length : 453
Keep-Alive : timeout=5, max=100
Connection : Keep-Alive
Content-Type : text/xml; charset=utf-8
Server : Lotus-Domino


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:MustUnderstand</faultcode>
         <faultstring>Did not understand "MustUnderstand" header(s):</faultstring>
         <detail/>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

在我的客户端上运行相同的请求会导致成功响应:

Running the same Request on my client leads to a successful response:

    ---------------- Request ---------------------------
POST https://domino.auto-partner.net/int/db/pub/webservi.nsf/ITSMSchnittstelle?OpenWebService HTTP/1.1
Connection: close
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "RETURNRESPONSE"
Authorization: Basic 
User-Agent: Jakarta Commons-HttpClient/3.1
Host: domino.auto-partner.net
Content-Length: 621

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:DefaultNamespace">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:RETURNRESPONSE soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <XDBREPID xsi:type="xsd:string">C125724100348230</XDBREPID>
         <XDOCID xsi:type="xsd:string">9AAF42C6539D4775C1257AB8004D1E7C</XDOCID>
         <XCHGID xsi:type="xsd:string">CRQ000000012555</XCHGID>
      </urn:RETURNRESPONSE>
   </soapenv:Body>
</soapenv:Envelope>

---------------- Response --------------------------
HTTP/1.1 200 OK
Date: Thu, 18 Jul 2013 06:47:11 GMT
Server: Lotus-Domino
Content-Type: text/xml; charset=utf-8
Content-Length: 558
Connection: close

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <soapenv:Body>
        <ns1:RETURNRESPONSEResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:DefaultNamespace"><RETURNRESPONSEReturn xsi:type="xsd:string">Success</RETURNRESPONSEReturn></ns1:RETURNRESPONSEResponse>
    </soapenv:Body>
</soapenv:Envelope>

我尝试了不同的 WS-A 和 WS-RM 设置,但都没有解决问题.

I played around with different WS-A and WS-RM settings, but non of them solved the problem.

如何定义不必理解响应?难道这个设置不在SoapUI中,而是在User-Agent中?

How can I define that the response does not have to be understood? Could it be that this setting is not in SoapUI but in User-Agent?

推荐答案

我遇到了同样的问题.

在我将以下请求属性WSS-Password Type"中的值更改为空白后,它对我有用.

It worked for me after I changed the value in the following request property "WSS-Password Type" to blank.

这篇关于'不明白'必须理解'SoapUI 响应中的标头错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆