51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 2178|回复: 1
打印 上一主题 下一主题

[求助] LR11测过webservice方法并且参数传的是以string格式传入xml文件的?

[复制链接]

该用户从未签到

1#
发表于 2013-5-31 10:05:56 | 只看该作者
你把xml保存在string就行了,注意转义
回复 支持 反对

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2013-5-29 18:05:06 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
脚本:

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;".
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-5-3 15:18 , Processed in 0.074042 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表