51Testing软件测试论坛

标题: loadrunner webservice返回值转义 [打印本页]

作者: s020500622    时间: 2016-3-3 17:51
标题: loadrunner webservice返回值转义
char * xml_input =
"<Req>"
"<TransactionCode>2002</TransactionCode>"
"<Data>"
"<HosId>1</HosId>"
"<DeptName></DeptName>"
"<DeptCode></DeptCode>"
"<WorkDateStart></WorkDateStart>"
"<WorkDateEnd></WorkDateEnd>"
"<WorkTime></WorkTime>"
"<RegType></RegType>"
"</Data>"
"</Req>";

Action()
{
//        web_set_max_html_param_len("102400");
        lr_save_string(xml_input, "data_xml");
        lr_start_transaction("QueryClinicDept");
        web_service_call( "StepName=service_101",
                "SOAPMethod=ServiceGateWay|ServiceGateWayHttpPort|service",
                "ResponseParam=response",
                "Service=ServiceGateWay",
                "ExpectedResponse=SoapResult",
                "Snapshot=t1456739650.inf",
                BEGIN_ARGUMENTS,
                "authInfo={\"SessionKey\":\"SessionKey\",\"Sign\":\"Sign\",\"ClientVersion\":\"1213\",\"ClientId\":\"5435131\"}",
                "sequenceNo=",
                "api=yy.yygh.QueryClinicDept",
                "param={data_xml}",
                "paramType=1",
                "outType=",
                "v=",
                END_ARGUMENTS,
                BEGIN_RESULT,
                "out=Param_out",
                END_RESULT,
                LAST);

服务器的xml返回值变成这样: &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;Resp&gt;&lt;TransactionCode&gt;1003&lt;/TransactionCode&gt;&lt;RespCode&gt;10000&lt;/RespCode&gt;&lt;RespMessage&gt;成功.&lt;/RespMessage&gt;&lt;Data&gt;&lt;HosId&gt;1001&lt;/HosId&gt;&ltrovinceCode&gt;

怎么转义回xml: <data> a<\data>这样的格式
作者: seagull1985    时间: 2016-3-4 10:09
不懂,帮顶。。。。




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