51Testing软件测试论坛

标题: LR11测过webservice方法并且参数传的是以string格式传入xml文件的? [打印本页]

作者: tgmm    时间: 2013-5-29 18:05
标题: LR11测过webservice方法并且参数传的是以string格式传入xml文件的?
脚本:

Action()
{

        web_service_call( "StepName=hospitalInfo_101",
                "SOAPMethod=IYyptWebService|IYyptWebServiceHttpPort|hospitalInfo",
                "ResponseParam=response",
                "Service=IYyptWebService",
                "ExpectedResponse=SoapResult",
                "Snapshot=t1369822024.inf",
                BEGIN_ARGUMENTS,
                "in0={NewParam}",
                END_ARGUMENTS,
                BEGIN_RESULT,
                "out=Param_out",
                END_RESULT,
                LAST);


return 0;
}


报错:
Action.c(4): Notify: Saving Parameter "hospitalInfo_101_Response = <hospitalInfo><out>&lt;?xml version="1.0" encoding="UTF-8"?&gt;\n&lt;back&gt;&lt;resultCode&gt;1&lt;/resultCode&gt;&lt;resultDesc&gt;Error on line 1 of document  : The element type "desc" must be terminated by the matching end-tag "&amp;lt;/desc&amp;gt;". Nested exception: The element type "desc" must be terminated by the matching end-tag "&amp;lt;/desc&amp;gt;".&lt;/resultDesc&gt;&lt;yl&gt;&lt;/yl&gt;&lt;/back&gt;</out></hospitalInfo>".
Action.c(4): Notify: Saving Parameter "response = <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:hospitalInfoResponse xmlns:ns1="http://webService.yypt.qyws.wondersgroup.com"><ns1ut>&lt;?xml version="1.0" encoding="UTF-8"?&gt;\n&lt;back&gt;&lt;resultCode&gt;1&lt;/resultCode&gt;&lt;resultDesc&gt;Error on line 1 of document  : The element type "desc" must be terminated by the matching end-tag "&amp;lt;/desc&amp;gt;". Nested exception: The element type "desc" must be terminated by the matching end-tag "&amp;lt;/desc&amp;gt;".&lt;/resultDesc&gt;&lt;yl&gt;&lt;/yl&gt;&lt;/back&gt;</ns1ut></ns1:hospitalInfoResponse></soap:Body></soap:Envelope>".
Action.c(4): Notify: Saving Parameter "aram_out = &lt;?xml version="1.0" encoding="UTF-8"?&gt;\n&lt;back&gt;&lt;resultCode&gt;1&lt;/resultCode&gt;&lt;resultDesc&gt;Error on line 1 of document  : The element type "desc" must be terminated by the matching end-tag "&amp;lt;/desc&amp;gt;". Nested exception: The element type "desc" must be terminated by the matching end-tag "&amp;lt;/desc&amp;gt;".&lt;/resultDesc&gt;&lt;yl&gt;&lt;/yl&gt;&lt;/back&gt;".
作者: 云层    时间: 2013-5-31 10:05
你把xml保存在string就行了,注意转义




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