web_reg_save_param用在web_service_call之前是不是不起作用?
本帖最后由 如果弯弯 于 2015-7-7 08:13 编辑同事的一段代码需要做关联,设置左右边界怎么也获取不到值,即使不设左右边界,仍然获取不到。是不是web_reg_save_param用在web_service_call之前是不是不起作用?因为F1里有这样一段说明
而action function 里不包括web_service_call
代码如下:
web_reg_save_param("okm",
"LB/IC=<return>",
"RB/IC=</return>",
"Ord=1",
"NotFound=ERROR",
"Search=Body",
LAST);
web_service_call( "StepName=registerOrUpdate_104",
"SOAPMethod=EmpiServiceImplService|EmpiServiceImplPort|registerOrUpdate",
"ResponseParam=response",
"Service=EmpiServiceImplService",
"URL=http://192.168.90.6:8580/EMPI/ws/empiService",
"ExpectedResponse=SoapResult",
"Snapshot=t1408432310.inf",
BEGIN_ARGUMENTS,
"registerXml=<empi_info><dept_code>47089035133040211A1001</dept_code><name>{name}</name><sex>2</sex><birthday>19501220</birthday><age></age><photo>1</photo><star_level>2</star_level><nationality></nationality><nation>01</nation><marital_status>20</marital_status><mobile_number>18267318187</mobile_number><tel_number>0519-81255655</tel_number><profession></profession><work_unit></work_unit><contacts></contacts><contacts_mobile></contacts_mobile><permanent_address>浙江省海宁市长安镇杏花村78号</permanent_address><permanent_code></permanent_code><permanent_house_no></permanent_house_no><permanent_zipcode></permanent_zipcode><address></address><address_code>123</address_code><address_hose_no></address_hose_no><address_zipcode>213613</address_zipcode><card_list><card><no>{jgz}</no><type>2</type><org>A1</org><serial_no></serial_no></card><card><no>{sbk}</no><type>4</type><org>47089035133040211A1001</org>\t<serial_no></serial_no></card></card_list></empi_info>",
END_ARGUMENTS,
BEGIN_RESULT,
"return=Param_return",
END_RESULT,
LAST);
lr_output_message(lr_eval_string("{okm}"));
执行日志如下:
Action.c(48): Registering web_reg_save_param was successful
Action.c(57): Notify: Parameter Substitution: parameter "name" ="测D"
Action.c(57): Notify: Parameter Substitution: parameter "jgz" ="jgz0010"
Action.c(57): Notify: Parameter Substitution: parameter "sbk" ="sbk0010"
Action.c(57): Web service call "registerOrUpdate_104" started
Action.c(57): t=1156ms: 142-byte response headers for "http://192.168.90.6:8580/EMPI/ws/empiService" (RelFrameId=1, Internal ID=1)
Action.c(57): HTTP/1.1 200 OK\r\n
Action.c(57): Server: Apache-Coyote/1.1\r\n
Action.c(57): Content-Type: text/xml;charset=UTF-8\r\n
Action.c(57): Content-Length: 321\r\n
Action.c(57): Date: Mon, 06 Jul 2015 00:51:40 GMT\r\n
Action.c(57): \r\n
Action.c(57): t=1304ms: 321-byte response body for "http://192.168.90.6:8580/EMPI/ws/empiService" (RelFrameId=1, Internal ID=1)
Action.c(57): <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:regi
Action.c(57): sterOrUpdateResponse xmlns:ns2="http://service.empi.xxxxxx.com/"><return>1|566bceba4aa3408
Action.c(57): 88ca81cb293ca3f70|鍢夊叴甯傜涓\x80鍖婚櫌浜\x8E2015-07-06 08:51:40鏇存柊鎴愬姛</return></
Action.c(57): ns2:registerOrUpdateResponse></soap:Body></soap:Envelope>
Action.c(57): Notify: Saving Parameter "registerOrUpdate_104_Response = <registerOrUpdate><return>1|566bceba4aa340888ca81cb293ca3f70|嘉兴市第一医院于2015-07-06 08:51:40更新成功</return></registerOrUpdate>".
Action.c(57): Notify: Saving Parameter "response = <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:registerOrUpdateResponse xmlns:ns2="http://service.empi.zebone.com/"><return>1|566bceba4aa340888ca81cb293ca3f70|鍢夊叴甯傜涓\x80鍖婚櫌浜\x8e2015-07-06 08:51:40鏇存柊鎴愬姛</return></ns2:registerOrUpdateResponse></soap:Body></soap:Envelope>".
Action.c(57): Notify: Saving Parameter "Param_return = 1|566bceba4aa340888ca81cb293ca3f70|嘉兴市第一医院于2015-07-06 08:51:40更新成功".
Action.c(57): Web service call "registerOrUpdate_104" was successful
Action.c(73): Warning: The string 'okm' with parameter delimiters is not a parameter.
Action.c(73): {okm}
Action.c(75): Notify: Transaction "checkempiri" ended with "Stop" status (Duration: 17.0793 Wasted Time: 0.4637).
Abort was called from an action.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
http://www.51testing.com/html/27/n-198327.html
与web_service_call函数无关,这篇文章能解决你的问题,楼主对比看看 jingzizx 发表于 2015-7-6 13:48
http://www.51testing.com/html/27/n-198327.html
与web_service_call函数无关,这篇文章能解决你的问题,楼 ...
这个之前看过,跟我们的不一样,我们用webservice能获取到参数的,见执行日志红色标记的上两行。
Action.c(57): Notify: Saving Parameter "registerOrUpdate_104_Response = <registerOrUpdate><return>1|566bceba4aa340888ca81cb293ca3f70|嘉兴市第一医院于2015-07-06 08:51:40更新成功</return></registerOrUpdate>".
Action.c(57): Notify: Saving Parameter "response = <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:registerOrUpdateResponse xmlns:ns2="http://service.empi.zebone.com/"><return>1|566bceba4aa340888ca81cb293ca3f70|鍢夊叴甯傜涓\x80鍖婚櫌浜\x8e2015-07-06 08:51:40鏇存柊鎴愬姛</return></ns2:registerOrUpdateResponse></soap:Body></soap:Envelope>".
Action.c(57): Notify: Saving Parameter "Param_return = 1|566bceba4aa340888ca81cb293ca3f70|嘉兴市第一医院于2015-07-06 08:51:40更新成功". 原因是,web_reg_save_param不能用于webservice协议的脚本 lr_xml_get_values stone0214 发表于 2015-11-5 11:15
lr_xml_get_values
恩,对。
页:
[1]