5

来自下面的 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 免费版。我想取出然后输入的值每次都会与响应不同。

4

1 回答 1

13

您需要设置属性转移步骤以将事件编号存储到属性中,然后您可以在请求中使用该属性。

此soapUI 教程涵盖了与您描述的情况相同的情况:

http://www.soapui.org/Functional-Testing/transferring-property-values.html

于 2013-06-05T21:10:36.760 回答