51Testing软件测试论坛
标题:
LR9.1中webservice脚本 怎么把XML当成字符串参数传递
[打印本页]
作者:
yzgonline
时间:
2010-4-8 17:55
标题:
LR9.1中webservice脚本 怎么把XML当成字符串参数传递
webservice脚本中有下面的函数
web_service_call( "StepName=createDoc_102",
"SOAPMethod=CmhkServiceImplService.CmhkServiceImplPort.createDoc",
"ResponseParam=response",
"Service=CmhkServiceImplService",
"Snapshot=t1270719792.inf",
BEGIN_ARGUMENTS,
"operatorID=11",
"docXml=222",
END_ARGUMENTS,
BEGIN_RESULT,
"return=Param_return",
END_RESULT,
LAST);
接口要求传入的参数 operatorID和docXml都是字符串 ,但是 docXml是以XML格式存在的,如下面
<?xml version="1.0" encoding="UTF-8" ?>
<STAMP>
<FILENAME>d:\test.png</FILENAME>
<FIELDNAME>SignatureField2</FIELDNAME>
</STAMP>
请问怎么把这个XML数据作为docXml参数传入进去!
麻烦高手指教!
作者:
superfang
时间:
2010-4-8 18:16
你是MM或是GG 如果是漂亮的MM 就告诉你!!!
作者:
yzgonline
时间:
2010-4-9 09:18
高手请进呀!
作者:
TIB
时间:
2010-4-9 10:15
用lr_save_string把xml数据保存到参数,在web_service_call中替换成参数:
web_service_call( "StepName=createDoc_102",
"SOAPMethod=CmhkServiceImplService.CmhkServiceImplPort.createDoc",
"ResponseParam=response",
"Service=CmhkServiceImplService",
"Snapshot=t1270719792.inf",
BEGIN_ARGUMENTS,
"operatorID={parm1}",
"docXml={parm2}",
END_ARGUMENTS,
BEGIN_RESULT,
"return=Param_return",
END_RESULT,
LAST);
作者:
pihuzi
时间:
2010-11-23 16:27
具体说下嘛?脚本改成什么样子
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2