TA的每日心情 | 郁闷 2015-11-13 09:43 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
Action()
{
//int status;
lr_start_transaction("获取设备数据");
web_reg_save_param("retCode2",
"LB={\"code\":\"",
"RB=\",",
"NotFound=WARNING",
LAST);
web_add_header("systoken" ,"dacd8d83fd603d8adca4ae5bbc1a3a3a");
web_submit_data("QueryDeviceData",
"Action=http://10.36.16.58:8080/iot/service/QueryDeviceData",
"Method=POST",
"Mode=HTTP",
ITEMDATA,
"Name=deviceCode","Value=52631249",ENDITEM,
"Name=sampleValue","Value=0",ENDITEM,
"Name=startTime","Value=2015-11-03 08:00:00",ENDITEM,
"Name=endTime","Value=2015-11-11 15:24:00",ENDITEM,
LAST);
if (atoi(lr_eval_string("{retCode2}"))==0)
{
lr_output_message("Successfull, code is:%s", lr_eval_string("{retCode2}"));
lr_end_transaction("获取设备数据", LR_PASS);
}
else{
lr_error_message("Failed, code is:%s", lr_eval_string("{retCode2}"));
lr_end_transaction("获取设备数据", LR_FAIL);
}
return 0;
}
************结果*************
Action.c(14): \r\n
Action.c(14): t=1245ms: 1051-byte response body for "http://10.36.16.58:8080/iot/service/QueryDeviceData" (RelFrameId=1, Internal ID=1)
Action.c(14): <html><head><title>Apache Tomcat/6.0.18 - Error report</title><style><!--H1 {font-family:T
Action.c(14): ahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-fami
Action.c(14): ly:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-
Action.c(14): family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY
Action.c(14): {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:T
Action.c(14): ahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,
Action.c(14): sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color :
Action.c(14): black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 415 - </h1><HR size="
Action.c(14): 1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>de
Action.c(14): scription</b> <u>The server refused this request because the request entity is in a format
Action.c(14): not supported by the requested resource for the requested method ().</u></p><HR size="1"
Action.c(14): noshade="noshade"><h3>Apache Tomcat/6.0.18</h3></body></html>
Action.c(14): Error -26616: HTTP Status-Code=415 (Unsupported Media Type) for "http://10.36.16.58:8080/iot/service/QueryDeviceData" [MsgId: MERR-26616]
Action.c(14): Warning -26377: No match found for the requested parameter "retCode2". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size [MsgId: MWAR-26377]
Action.c(14): web_submit_data("QueryDeviceData") highest severity level was "ERROR", 1051 body bytes, 164 header bytes [MsgId: MMSG-26388]
Action.c(14): Notify: Transaction "获取设备数据" ended with "Fail" status (Duration: 1.3677 Wasted Time: 1.1597). |
|