Web Services类型请求中替换XML格式的节点值的方法
来源:互联网 发布:初级数据分析师面试题 编辑:程序博客网 时间:2024/05/22 03:18
LoadRunner在Web Services请求的XML格式串中需要参数化某一个参数,以前的做法是使用string类函数拼出新的XML串,但经过深入的学习lr_save_string()和lr_eval_string()两个函数,发现有更简洁的方法,如下:
使用函数lr_save_string()与lr_eval_string()完成转换:
lr_save_string( lr_eval_string("{NewParam}"),"username");
其中{NewParam}为使用lr自带的参数化而成的参数。
然后,传入username:
例如:
soap_request("StepName=Login",
"URL=http://10.0.16.221/i6P/i6Service/WinLoginService.asmx",
"SOAPEnvelope=<?xml version=/"1.0/" encoding=/"GBK/" standalone=/"no/"?"
"><soap:Envelope xmlns:xsd=/"http://www.w3.org/2001/XMLSchema/" xmlns"
":xsi=/"http://www.w3.org/2001/XMLSchema-instance/" xmlns:soap=/"http:/"
"/schemas.xmlsoap.org/soap/envelope//"><soap:Body><Login xmlns=/"http:/"
"/tempuri.org//"><userConnectString>lers14t;5a8i2ix3b4g7=318p="
"j0t030c2jyio1r9i0nid3tt4xp89ocaNv8yt0ycahce0ol9nwen4ieh0cxoth5t8vylepx"
"lecp=jesI8qgel20cttlm3iaee=bn19tcn;yrsmheyorm0v9qe51rxs="
"ja1bw0eu.2e0b5.301;s6r3.bd2qp22s136;opdeDa9wt51aembxxarjsweelb="
"r6nttgrS0s50920541ih;equdIs5mer2r62 e=itodjl=.0s5kaw4;"
"rtp8Na0bs6wsgmwssoo6r5pd9i=kr1pq2gu3s24hj5ve6ykvxql6il="
"nandI62.ua7hc0kkvbeCnsmpv;lyy3ptgsseaxgryy18b8o8rt4v0e2y2wibrgoygleh9="
"dmehh9020t3u.i2jd2ixgtsu26a1yxxbpaa10000001000010010000001000000000000"
"000000100000000110000010000110000100000000000000</userConnectString>"
"<curAcc>0001</curAcc><logid>{username}</logid><passWord/></Login></soap"
":Body></soap:Envelope>",
"Snapshot=t35.inf",
"ResponseParam=response",
LAST);
- Web Services类型请求中替换XML格式的节点值的方法
- 谈谈获取XML格式数据中特定节点值的方法
- 读取web.config中单个节点的方法 (读取xml文件的方法测试完毕,成功)
- attrs.xml文件中属性类型format值的格式 .
- attrs.xml文件中属性类型format值的格式
- attrs.xml文件中属性类型format值的格式
- attrs.xml文件中属性类型format值的格式
- 取xml任意节点中某个属性值的方法
- 取任意xml节点中某个属性值的方法
- XML文档的节点类型
- Web Services开发总结三 一个简单的XML格式定义
- web.xml中filter的类型
- 在VC++6.0中调用Web Services的方法
- 创建 XML Web services 方法
- 创建 XML Web services 方法
- Android中WebView中拦截所有请求并替换URL(支持AJAX的post请求类型)
- Java web.xml中节点调用的顺序
- web.xml中Servlet 配置的四个节点
- iphone静态库
- 求助C#调用C++dll异常解决
- error while loading shared libraries的解決方法
- jstl之foreach的属性
- GPS定位
- Web Services类型请求中替换XML格式的节点值的方法
- NVRAM读写操作
- Android 网络编程---STRUTS2,JSON,HttpClient
- MyEclipse8.5安装jbpm4.3插件更新至Myeclipse8.6出错的解决办法
- 儒略日反推计算日期
- Chapter8 Loader
- with inner join & with outer join
- grep awk sed
- SQL Server 中对XML数据的五种基本操作【转】