我是SoapUI的新手,并试图了解XPATH调度在模拟服务中用于模拟操作的用法。
这是我到目前为止所做的
以下是该操作的示例请求
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cal="http://www.parasoft.com/wsdl/calculator/">
<soapenv:Header/>
<soapenv:Body>
<cal:subtract>
<cal:x>1</cal:x>
<cal:y>1</cal:y>
</cal:subtract>
</soapenv:Body>
</soapenv:Envelope>
Run Code Online (Sandbox Code Playgroud)
以下是针对相同内容的示例响应
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cal="http://www.parasoft.com/wsdl/calculator/">
<soapenv:Header/>
<soapenv:Body>
<cal:subtractResponse>
<cal:Result>?</cal:Result>
</cal:subtractResponse>
</soapenv:Body>
</soapenv:Envelope>
Run Code Online (Sandbox Code Playgroud)
我能够了解其他调度,但不了解XPATH,因为以下是我在XPATH调度中输入的内容
declare namespace cal='http://www.parasoft.com/wsdl/calculator/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
//cal:subtract/cal:x
Run Code Online (Sandbox Code Playgroud)
还观察到,如果我已经使用过SCRIPT分派并从下拉列表切换到XPATH,则该脚本在声明/脚本框/区域中可见
以下是问题:
请帮助我。
PS:我已经浏览过 http://www.soapui.org/soap-mocking/reference/mockoperation.html http://www.soapui.org/soap-mocking/mockoperations-and-responses.html