Перейти к содержимому

Фотография

Как получить данные из ответа сервера ?


  • Авторизуйтесь для ответа в теме
Сообщений в теме: 2

#1 SergeyP

SergeyP

    Специалист

  • Members
  • PipPipPipPipPip
  • 651 сообщений
  • Город:Москва

Отправлено 22 января 2010 - 14:27

Выполняю функции

web_url("AAAA", 
		"URL=http://xxx.xxxx.xxxx/xxxx", 
		"Resource=0", 
		"RecContentType=text/html", 
		"Referer=", 
		"Snapshot=t1.inf", 
		"Mode=HTML", 
		EXTRARES, 
		"Url=../XXXXXX.gif", http://xxx.xxxx.xxxx/xxxx", ENDITEM, 
		LAST);

	web_reg_save_param ("Session_ID",
			"LB=Set-Cookie: JSESSIONID=",
			"RB=;",
			LAST);

	lr_output_message(lr_eval_string("{Session_ID}"));

При этом в ReplayLog
...............................
vuser_init.c(23):	 HTTP/1.1 200 OK\r\n
vuser_init.c(23):	 Date: Fri, 22 Jan 2010 14:07:08 GMT\r\n
vuser_init.c(23):	 Server: Apache\r\n
vuser_init.c(23):	 X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)
vuser_init.c(23):	 /Tomcat-5.5\r\n
vuser_init.c(23):	 Set-Cookie: JSESSIONID=E7B65092F352F254930C822E810DE316; Path=/\r\n
vuser_init.c(23):	 Set-Cookie: FSID=21224A45F50B0F41A622A4A6A2C3D64C; Path=/\r\n
vuser_init.c(23):	 Content-Length: 5728\r\n
vuser_init.c(23):	 Keep-Alive: timeout=15, max=100\r\n
vuser_init.c(23):	 Connection: Keep-Alive\r\n
vuser_init.c(23):	 Content-Type: text/html;charset=UTF-8\r\n
vuser_init.c(23):	 \r\n
......
vuser_init.c(34): Registering web_reg_save_param was successful	  [MsgId: MMSG-26390]
vuser_init.c(40): {Session_ID}

Но в последней строке д.б.
vuser_init.c(40): E7B65092F352F254930C822E810DE316

М.б. кто-то поможет ?

Заранее спасибо. !
  • 0

#2 Troubleshooter

Troubleshooter

    Опытный участник

  • Members
  • PipPipPipPip
  • 398 сообщений
  • Город:Киев

Отправлено 22 января 2010 - 15:36

web_reg_save_param is a registration type function. It registers a request to find and save a text string within the Web page that was retrieved. The operation is performed only after executing the next action function, such as web_url.

web_reg_save_param должна быть перед web_url, а не после.
  • 0

#3 SergeyP

SergeyP

    Специалист

  • Members
  • PipPipPipPipPip
  • 651 сообщений
  • Город:Москва

Отправлено 22 января 2010 - 15:53

web_reg_save_param is a registration type function. It registers a request to find and save a text string within the Web page that was retrieved. The operation is performed only after executing the next action function, such as web_url.

web_reg_save_param должна быть перед web_url, а не после.


Все получилось ! Большое спасибо !
  • 0


Количество пользователей, читающих эту тему: 0

0 пользователей, 0 гостей, 0 анонимных