黑柴 发表于 2012-6-29 11:42:56

【求大神指导】web_custom_request造成脚步回放错误

录了个B/S登陆系统的脚步,每次回放都报错。
Web Request      ( d90: 368)] "GET /MainFrame.application?Ticket=ZfSOpkiA2WlYaFUBuSZ2g46pNbrimdvSsj3hZGWyBaF3sAu6ZjuI2wb%2fKHCJeeulkQvozWpXGveW164b7v%2feCRmYFzC6e9ZzZX2akUt%2bG7a58VvqnkA5Ani5rmnv9%2bt9HcFtYLdPE3aRzj9p2WuhQ3MiuTokogD4wYedehmlej7IFVcPLflYa6X2BEISN%2f7jRYHvKXv6A5Hc8OkDgAni6PyYvocR2Im8%2bikWSIGs2IkuP7uQHGdZrWLJXyj5Vm5t97tAYpcKtouU1hZFObxpCNjDeU2y4D6jCvX7RGOSgNMNQ4NSH%2bZ4MiCYLKwosImZy4vo6HBU4srooFZ6AS9cUECuB7wL4i5Cgo%2fGeOzkob3PY8%2fmjZtkmrGAOd0pgfFqDaPN4IR4Gvxay5PtvT3Pa0l%2btbFwXbYGTWUUdGBAi9GuLSbEreIw3Q%3d%3d&ApplicationID=SHinfo&IETitle=%e7%99%bb%e5%bd%95"   
   (Sid:8) Client -> Server : 1173 bytes (Service=HTTP)
   (Sid:8) Server -> Client : 2141 bytes(Service=HTTP)
Address lookup for wpad. failed. Error code = 11001
录了两次,发现脚本中红色部分不同,求解决办法
web_submit_form("login.aspx_2",
                "Snapshot=t12.inf",
                ITEMDATA,
                "Name=userName", "Value=mesdb", ENDITEM,
                "Name=password", "Value=1", ENDITEM,
                "Name=btnlogin", "Value=登录", ENDITEM,
                LAST);

        lr_think_time(9);

        web_custom_request("sso_service",
                "URL=http://10.129.140.25:8001/sso_service",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/xml",
                "Referer=",
                "Snapshot=t13.inf",
                "Mode=HTML",
                "EncType=text/xml; charset=utf-8",
                "Body=<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">"
                "<s:Body><SSO_CheckCommand xmlns=\"http://tempuri.org/\">"
                "<c xmlns:a=\"http://schemas.datacontract.org/2004/07/SSOModel.Extend\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">"
                "<a:_x003C_pTicket_x003E_k__BackingField z:Id=\"i1\" xmlns:z=\"http://schemas.microsoft.com/2003/10/Serialization/\">"
                "<a:ApplicationId>SHinfo</a:ApplicationId><a:Authenticator>ZfSOpkiA2WlYaFUBuSZ2g46pNbrimdvSsj3hZGWyBaF3sAu6ZjuI2wb/"
                "KHCJeeulkQvozWpXGveW164b7v/eCRmYFzC6e9ZzZX2akUt+G7a58VvqnkA5Ani5rmnv9+t9HcFtYLdPE3aRzj9p2WuhQ3MiuTokogD4wYedehmlej7IFVcPLflYa6X2BEISN/7jRYHvKXv6A5Hc8OkDgAni6PyYvocR2Im8+ikWSIGs2IkuP7uQHGdZrWLJXyj5Vm5t97tAYpcKtouU1hZFObxpCNjDeU2y4D6jCvX7RGOSgNMNQ4NSH+Z4MiCYLKwosImZy4vo6HBU4srooFZ6AS9cUECuB7wL4i5Cgo/GeOzkob3PY8/mjZtkmrGAOd0pgfFqDaPN4IR4Gvxay5PtvT3Pa0l+tbFwXbYGTWUUdGBAi9GuLSbEreIw3Q=="
                "</a:Authenticator><a:ReturnUrl/><a:UserId i:nil=\"true\"/><a:UserName i:nil=\"true\"/></a:_x003C_pTicket_x003E_k__BackingField></c>"
                "<key>key1.0</key></SSO_CheckCommand></s:Body></s:Envelope>",
                LAST);

云层 发表于 2012-6-29 12:16:00

写个关联。。。

黑柴 发表于 2012-6-29 14:48:58

做了如下改动仍然不对:web_reg_save_param ("Mykey",//参数名称
    "NOTFOUND=ERROR",//未找到时标记错误
    "LB=</a:ApplicationId><a:Authenticator>",//左边界
    "RB=</a:Authenticator>" ,//右边界
    "ORD=1", //匹配的实例数,默认是1,如果设置为All,将所有匹配的参数值保存为数组。
    "Search=ALL",

LAST );


web_custom_request("sso_service",

"URL=http://10.129.140.25:8001/sso_service",

"Method=POST",

"Resource=0",

"RecContentType=text/xml",

"Referer=",

"Snapshot=t10.inf",

"Mode=HTML",

"EncType=text/xml; charset=utf-8",

"Body=<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">"

"<s:Body><SSO_CheckCommand xmlns=\"http://tempuri.org/\">"

"<c xmlns:a=\"http://schemas.datacontract.org/2004/07/SSOModel.Extend\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">"

"<a:_x003C_pTicket_x003E_k__BackingField z:Id=\"i1\" xmlns:z=\"http://schemas.microsoft.com/2003/10/Serialization/\">"

"<a:ApplicationId>SHinfo</a:ApplicationId><a:Authenticator>{Mykey}"

"</a:Authenticator><a:ReturnUrl/><a:UserId i:nil=\"true\"/><a:UserName i:nil=\"true\"/></a:_x003C_pTicket_x003E_k__BackingField></c>"

"<key>key1.0</key></SSO_CheckCommand></s:Body></s:Envelope>",

LAST);

报错如下:
Action.c(40): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "http://10.129.140.25:8001/sso_service"

Action.c(40): Error -26377: No match found for the requested parameter "Mykey". 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

Action.c(40): web_custom_request("sso_service") highest severity level was "ERROR", 626 body bytes, 166 header bytes



因为是第一次用关联,不知道自己弄得对不对,错误信息在网上查了下解决办法,也没有搞定。辛苦云层等大神了

joykao 发表于 2012-6-29 15:12:25

除了关联是不是还有安全验证什么的过程限制啊?:o
页: [1]
查看完整版本: 【求大神指导】web_custom_request造成脚步回放错误