51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1797|回复: 2
打印 上一主题 下一主题

[原创] LR socket 关联

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2011-5-25 12:43:05 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Action()
{

lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=192.168.1.21:8080", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_save_param("socket0", LRS_LAST_RECEIVED, "SESSIONID2", 1500, 36);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_save_param("socket0", LRS_LAST_RECEIVED, "userbz", 865, 36);
lrs_close_socket("socket0");
return 0;
}

data.ws中内容

send  buf0 2727
"OST /SystemManagement/Jinher.POA.PC.SystemManagement.BP.UserOperateBP/PC "
"HTTP/1.1\r\n"
"Content-Type: application/soap+xml; charset=utf-8\r\n"
"Host: 192.168.1.21:8080\r\n"
"Content-Length: 2465\r\n"
"Expect: 100-continue\r\n"
"Accept-Encoding: gzip, deflate\r\n"
"Connection: Keep-Alive\r\n"
"\r\n"
"<s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:a=\""
"http://www.w3.org/2005/08/addressing\"><s:Header><a:Action s:mustUnderstan"
"d=\"1\">http://tempuri.org/IUserOperate/UserLogin&lt;/a:Action><a:MessageID>u"
"rn:uuid:ebdfea72-58a2-4dd5-82fc-f45e6887bc8f</a:MessageID><a:ReplyTo><a:Ad"
"dress>http://www.w3.org/2005/08/addressing/anonymous&lt;/a:Address></a:ReplyT"
"o><__ApplicationContext xmlns=\"urn:Jinher.com\" xmlns:i=\"http://www.w3.o"
"rg/2001/XMLSchema-instance\"><KeyValueOfstringanyType xmlns=\"http://schem"
"as.microsoft.com/2003/10/Serialization/Arrays\"><Key>context</Key><Value i"
":type=\"b:ContextDTO\" xmlns:b=\"http://schemas.datacontract.org/2004/07/J"
"inher.JAP.BF.BE.Deploy.Base\"><b:ID>ee0a48c9-0192-45e9-b551-2d698069b283</"
"b:ID><boginCurrentCulture>Zh_cn</boginCurrentCulture><boginDepartmen"
"t>4c25989b-fe72-47b3-b9cb-448e934c2a41</boginDepartment><boginDepartme"
"ntName>C6V3浜у搧鐮斿彂閮"
"\xa8"
"</boginDepartmentName><boginIP>192.168.1.5</boginIP><boginOrg>064a"
"0df4-e7d2-4a3b-bb90-54d68b7095a8</boginOrg><b:LoginOrgName>閲戝拰杞欢<"
"/b:LoginOrgName><b:LoginTime>2011-05-25T11:19:18.7421742+08:00</b:LoginTim"
"e><b:LoginUserCode>guest</b:LoginUserCode><b:LoginUserID>00000000-0000-000"
"0-0000-000000000000</b:LoginUserID><b:LoginUserName>guest</b:LoginUserName"
"><b:SessionID/></Value></KeyValueOfstringanyType></__ApplicationContext><a"
":To s:mustUnderstand=\"1\">http://192.168.1.21:8080/SystemManagement/Jinhe"
"r.POA.PC.SystemManagement.BP.UserOperateBP/PC</a:To></s:Header><s:Body><Us"
"erLogin xmlns=\"http://tempuri.org/\"><UCache xmlns:b=\"http://schemas.dat"
"acontract.org/2004/07/Jinher.POA.PC.SystemManagement.Deploy.CustomDTO\" xm"
"lns:i=\"http://www.w3.org/2001/XMLSchema-instance\"><b:ID i:nil=\"true\"/>"
"<b:Latitude i:nil=\"true\"/><b:LoginClient>CClient</b:LoginClient><b:Logi"
"nCurrentCulture>Zh_cn</b:LoginCurrentCulture><b:LoginDepartment>00000000-0"
"000-0000-0000-000000000000</b:LoginDepartment><b:LoginDepartmentName i:nil"
"=\"true\"/><b:LoginIP i:nil=\"true\"/><b:LoginOrg>00000000-0000-0000-0000-"
"000000000000</b:LoginOrg><b:LoginOrgName i:nil=\"true\"/><b:LoginTime>0001"
"-01-01T00:00:00</b:LoginTime><b:LoginUserCode><USERNAME></b:LoginUserCode><b:Log"
"inUserID>00000000-0000-0000-0000-000000000000</b:LoginUserID><b:LoginUserN"
"ame i:nil=\"true\"/><b:Longitude i:nil=\"true\"/><b:OnlineStatus>Online</b"
":OnlineStatus><b:SessionID i:nil=\"true\"/><b:SessionTimeStamp>0001-01-01T"
"00:00:00</b:SessionTimeStamp><b:UserPassword><WD></b:UserPassword></UCac"
"he></UserLogin></s:Body></s:Envelope>"
recv  buf1 1752
"HTTP/1.1 200 OK\r\n"
"Content-Length: 1592\r\n"
"Content-Type: application/soap+xml; charset=utf-8\r\n"
"Server: Microsoft-HTTPAPI/2.0\r\n"
"Date: Wed, 25 May 2011 03:19:23 GMT\r\n"
"\r\n"
"<s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:a=\""
"http://www.w3.org/2005/08/addressing\"><s:Header><a:Action s:mustUnderstan"
"d=\"1\">http://tempuri.org/IUserOperate/UserLoginResponse&lt;/a:Action><Activ"
"ityId CorrelationId=\"9b1c4d42-40d6-41b2-829f-51fb55c5a116\" xmlns=\"http:"
"//schemas.microsoft.com/2004/09/ServiceModel/Diagnostics\">272ea864-3d10-4"
"fbf-8a02-1676cfe7bdfc</ActivityId><a:RelatesTo>urn:uuid:ebdfea72-58a2-4dd5"
"-82fc-f45e6887bc8f</a:RelatesTo></s:Header><s:Body><UserLoginResponse xmln"
"s=\"http://tempuri.org/\"><UserLoginResult xmlns:b=\"http://schemas.dataco"
"ntract.org/2004/07/Jinher.POA.PC.SystemManagement.Deploy.CustomDTO\" xmlns"
":i=\"http://www.w3.org/2001/XMLSchema-instance\"><b:ID>ef6d5dce-ee04-4ca6-"
"b54a-243442c44711</b:ID><b:Latitude i:nil=\"true\"/><b:LoginClient>CClien"
"t</b:LoginClient><b:LoginCurrentCulture>Zh_cn</b:LoginCurrentCulture><b:Lo"
"ginDepartment>00000000-0000-0000-0000-000000000000</b:LoginDepartment><b:L"
"oginDepartmentName i:nil=\"true\"/><b:LoginIP i:nil=\"true\"/><b:LoginOrg>"
"00000000-0000-0000-0000-000000000000</b:LoginOrg><b:LoginOrgName i:nil=\"t"
"rue\"/><b:LoginTime>2011-05-25T11:19:22.2510193+08:00</b:LoginTime><b:Logi"
"nUserCode>3333</b:LoginUserCode><b:LoginUserID>ef6d5dce-ee04-4ca6-b54a-243"
"442c44711</b:LoginUserID><b:LoginUserName i:nil=\"true\"/><b:Longitude i:n"
"il=\"true\"/><b:OnlineStatus>Online</b:OnlineStatus><b:SessionID>d35364f4-"
"cc88-49e6-b39f-2ce13d9b8c48</b:SessionID><b:SessionTimeStamp>2011-05-25T11"
":19:22.2510193+08:00</b:SessionTimeStamp><b:UserPassword>111111</b:UserPas"
"sword></UserLoginResult></UserLoginResponse></s:Body></s:Envelope>"
send  buf2 1824
"OST /SNS/Jinher.POA.PC.SNS.BP.ContactQueryServiceBP/PC HTTP/1.1\r\n"
"Content-Type: application/soap+xml; charset=utf-8\r\n"
"Host: 192.168.1.21:8080\r\n"
"Content-Length: 1604\r\n"
"Expect: 100-continue\r\n"
"Accept-Encoding: gzip, deflate\r\n"
"\r\n"
"<s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:a=\""
"http://www.w3.org/2005/08/addressing\"><s:Header><a:Action s:mustUnderstan"
"d=\"1\">http://tempuri.org/IContactQueryService/GetUsersContacts&lt;/a:Action"
"><a:MessageID>urn:uuid:a7eef8f3-dd4c-4219-8f14-0a799dc9a597</a:MessageID><"
"a:ReplyTo><a:Address>http://www.w3.org/2005/08/addressing/anonymous&lt;/a:Add"
"ress></a:ReplyTo><__ApplicationContext xmlns=\"urn:Jinher.com\" xmlns:i=\""
"http://www.w3.org/2001/XMLSchema-instance\"><KeyValueOfstringanyType xmlns"
"=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><Key>contex"
"t</Key><Value i:type=\"b:ContextDTO\" xmlns:b=\"http://schemas.datacontrac"
"t.org/2004/07/Jinher.JAP.BF.BE.Deploy.Base\"><b:ID>ef6d5dce-ee04-4ca6-b54a"
"-243442c44711</b:ID><b:LoginCurrentCulture>Zh_cn</b:LoginCurrentCulture><b"
":LoginDepartment>00000000-0000-0000-0000-000000000000</b:LoginDepartment><"
"b:LoginDepartmentName i:nil=\"true\"/><b:LoginIP>192.168.1.86</b:LoginIP><"
"b:LoginOrg>00000000-0000-0000-0000-000000000000</b:LoginOrg><b:LoginOrgNam"
"e i:nil=\"true\"/><b:LoginTime>0001-01-01T00:00:00</b:LoginTime><b:LoginUs"
"erCode>3333</b:LoginUserCode><b:LoginUserID>ef6d5dce-ee04-4ca6-b54a-243442"
"c44711</b:LoginUserID><b:LoginUserName i:nil=\"true\"/><b:SessionID>d35364"
"f4-cc88-49e6-b39f-2ce13d9b8c48</b:SessionID></Value></KeyValueOfstringanyT"
"ype></__ApplicationContext><a:To s:mustUnderstand=\"1\">http://192.168.1.2"
"1:8080/SNS/Jinher.POA.PC.SNS.BP.ContactQueryServiceBP/PC</a:To></s:Header>"
"<s:Body><GetUsersContacts xmlns=\"http://tempuri.org/\"><userId>ef6d5dce-e"
"e04-4ca6-b54a-243442c44711</userId></GetUsersContacts></s:Body></s:Envelop"
"e>"


请问各位,我在树结构图中,找到sessionid并设置关联了,参数名称为<SID>,需要在data。ws中将sessionID也替换成参数<SID>吗?

另外,我在data.ws中选择sessionID的具体内容,然后选择替换成现有参数时,没有显示出SID这个参数呢,这是为什么?
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2011-5-25 19:48:40 | 只看该作者
各位大侠路过时候请指教啊,关联后,在data.ws中需要将sessionID内容替换成关联的参数吗

例如:关联后的参数名为SID  ,在data.ws中是否要将sessionID的内容替换成SID呢
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2011-6-2 11:37:01 | 只看该作者
回复 2# xiaoxia318205


    怎么不用http协议来录呢{:4_83:}
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-8 03:08 , Processed in 0.066812 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表