51Testing软件测试论坛

标题: webservice响应报文截取问题,大神们请进,坐等。。。 [打印本页]

作者: tracy0079    时间: 2014-12-11 18:26
标题: webservice响应报文截取问题,大神们请进,坐等。。。
  <?xml version="1.0" encoding="utf-8" ?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soap:Body>
- <ns1:dispatchCommandResponse xmlns:ns1="http://control.ppcore.haobai.huateng.com">
  <ns1ut><?xml version="1.0" encoding="UTF-8"?> <ayPlatResponseParameter><RESPONSE-INFO REQWEBSVRCODE="100101" RESPONSETYPE="20" KEEP="91010000112013052717325996726063" RESULT="SUCCESS"/><RESPONSECODE>000000</RESPONSECODE><RESPONSECONTENT></RESPONSECONTENT><CURRDATE>20140303</CURRDATE><RESULTDATESET><DATAS CUSTOMER_NO="3177000000014586" PRODUCT_NO="13812038709" CUSTOMER_NAME="压力测试用户" ID_TYPE="1" ID_NO="222222222212038709" AREA_CODE="null" CITY_CODE="null" /></RESULTDATESET></PayPlatResponseParameter></ns1ut>
  </ns1:dispatchCommandResponse>
  </soap:Body>
  </soap:Envelope>

这是webservice的响应报文,怎么截取<RESPONSECODE>000000</RESPONSECODE>中的000000,我用 lr_xml_get_values("xml={response}",
          "ValueParam=result",
          "Query=/PayPlatResponseParameter/RESPONSECODE",
          LAST);这个函数说Action.c(36): Error: No matches were found for the specified query: "/PayPlatResponseParameter/RESPONSECODE". [class:CLrXmlScriptFunc]
Action.c(36): Error: "lr_xml_get_values" execution failed
作者: tracy0079    时间: 2014-12-11 18:28
<?xml version="1.0" encoding="utf-8" ?>

- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soap:Body>
- <ns1:dispatchCommandResponse xmlns:ns1="http://control.ppcore.haobai.huateng.com">
<ns1ut><?xml version="1.0" encoding="UTF-8"?> <ayPlatResponseParameter><RESPONSE-INFO REQWEBSVRCODE="100101" RESPONSETYPE="20" KEEP="91010000112013052717325996726063" RESULT="SUCCESS"/><RESPONSECODE>000000</RESPONSECODE><RESPONSECONTENT></RESPONSECONTENT><CURRDATE>20140303</CURRDATE><RESULTDATESET><DATAS CUSTOMER_NO="3177000000014586" PRODUCT_NO="13812038709" CUSTOMER_NAME="压力测试用户" ID_TYPE="1" ID_NO="222222222212038709" AREA_CODE="null" CITY_CODE="null" /></RESULTDATESET></PayPlatResponseParameter></ns1ut>

</ns1:dispatchCommandResponse>


</soap:Body>


</soap:Envelope>







作者: hp21818972    时间: 2014-12-12 01:33
query写错了,应该写Query=/Envelope/Body/ns1:dispatchCommandResponse/ns1:xxnt/PayPlatResponseParameter/RESPONSECODE




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2