云层 发表于 2013-5-31 10:05:56

你把xml保存在string就行了,注意转义

tgmm 发表于 2013-5-29 18:05:06

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"><ns1: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;</ns1:out></ns1:hospitalInfoResponse></soap:Body></soap:Envelope>".
Action.c(4): Notify: Saving Parameter "Param_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;".
页: [1]
查看完整版本: LR11测过webservice方法并且参数传的是以string格式传入xml文件的?