xiaoxia318205 发表于 2011-5-25 12:43:05

LR socket 关联

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中内容

sendbuf0 2727
"POST /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><b:LoginCurrentCulture>Zh_cn</b:LoginCurrentCulture><b:LoginDepartmen"
"t>4c25989b-fe72-47b3-b9cb-448e934c2a41</b:LoginDepartment><b:LoginDepartme"
"ntName>C6V3浜у搧鐮斿彂閮"
"\xa8"
"</b:LoginDepartmentName><b:LoginIP>192.168.1.5</b:LoginIP><b:LoginOrg>064a"
"0df4-e7d2-4a3b-bb90-54d68b7095a8</b:LoginOrg><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>PCClient</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><PWD></b:UserPassword></UCac"
"he></UserLogin></s:Body></s:Envelope>"
recvbuf1 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>PCClien"
"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>"
sendbuf2 1824
"POST /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这个参数呢,这是为什么?

xiaoxia318205 发表于 2011-5-25 19:48:40

各位大侠路过时候请指教啊,关联后,在data.ws中需要将sessionID内容替换成关联的参数吗

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

wyh1987com 发表于 2011-6-2 11:37:01

回复 2# xiaoxia318205


    怎么不用http协议来录呢{:4_83:}
页: [1]
查看完整版本: LR socket 关联