来自下面的SOAP UI响应;
<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>
<ns0:HelpDesk_Submit_ServiceResponse xmlns:ns0="urn:HPD_IncidentInterface_Create_WS">
<ns0:Incident_Number>**INC000000000274**</ns0:Incident_Number>
</ns0:HelpDesk_Submit_ServiceResponse>
</soapenv:Body>
</soapenv:Envelope>
我想取出 INC000000000274 ,然后将其反馈到新的SOAP UI请求中的特定位置,如下所示;
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:HPD_IncidentInterface_WS">
<soapenv:Header>
<urn:AuthenticationInfo>
<urn:userName></urn:userName>
<urn:password></urn:password>
<!--Optional:-->
<urn:authentication></urn:authentication>
<!--Optional:-->
<urn:locale></urn:locale>
<!--Optional:-->
<urn:timeZone></urn:timeZone>
</urn:AuthenticationInfo>
</soapenv:Header>
<soapenv:Body>
<urn:HelpDesk_Query_Service>
<urn:Incident_Number>**INC000000000274**</urn:Incident_Number>
</urn:HelpDesk_Query_Service>
我该怎么办?我正在使用SOAP UI免费版。每次从响应中我想要取出然后输入的值都是不同的。
答案 0 :(得分:13)
您需要设置属性转移步骤以将事件编号存储到属性中,然后您可以在请求中使用该属性。
这个soapUI教程涵盖了与您描述的情况相同的情况:
http://www.soapui.org/Functional-Testing/transferring-property-values.html