Forum Discussion

Gupta_Gaurav_Ku's avatar
Gupta_Gaurav_Ku
Occasional Contributor
16 years ago

Cookie , HTTP session

Hi,

SOAPUI version using :-
soapUI Pro 2.5 beta2,
Build daily-2008-11-17-[1], Build Date 2008/11/17 02:13

This is my test scenario: -
Precondition: Maintain HTTP session is checked 

Step1 (SOAP request) :-
*****************************
Request:

POST /meter_db-smfSrv?sid=513:47:25001267989755 HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: 10.255.244.104:8000
Content-Length: 490

 
 
 
JAFA_LOCATION 
Gaurav 
JAFA_Customer 
00919212272017 
420420 
00919212272017 
test123 
 


Response:

HTTP/1.1 200 OK
Server: Alcatel OSP 2.4
Content-Type: text/xml; charset=utf-8
Content-Length: 649
Connection: close
Set-Cookie: OSP_Ref=0000002c3f80001a-2;Domain=10.255.244.104:8000;Path=/meter_db-smfSrv





1
CONSUMER MUST BE UNIQUE



********************

Step2 (Groovy Script) :-
********************
def state = context.getProperty( com.eviware.soapui.model.testsuite.TestRunContext.HTTP_STATE_PROPERTY)
if(state!=null){
log.info "state found"
def cookies = state.cookies
log.info "cookies.length " + cookies.length;
for( int c=0; c
log.info "cookie 1" + cookies[c].name + " = " + cookies[c].value 
}
}
else {
log.error "state not found"
}

//Output
state found
cookies.length 0
********************


Step3 (SOAP request) :-
********************
Request:

POST /meter_db-smfSrv?sid=513:47:25001267989755 HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: 10.255.244.104:8000
Content-Length: 918

 
 
 
420420 
0 
0 
JAFA_LOCATION 
100 
<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?> 
100200 
100200 
1 
JAFA_Meter_Group 
16:35:16 
0 
17/02/3009 
100 
JAFA Type 
100200 
 


Response:

HTTP/1.0 500 Internal Server Error
Server: Alcatel-Lucent OSP fephttp 2.4
Content-Type: text/xml; charset=utf-8
Connection: close





SOAP-ENV:Server
Duplicated session ID




********************

Issues: -
Step 2: - Cookies are not printing or returned, which returns in response of Request 1. As I checked the Maintain HTTP session option
Step 3: - Cookies are not included in Request 3, which returned in response of Request 1.

Please clear this stuff, since lot of confusion I saw on the forum.


KR,
Gaurav
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Gaurav

    It seems you are using a pretty old beta-version, please try the latest nightly build (http://www.eviware.com/nightly-builds) to see if the problem persists.

    If it does, please attach  a project-file or something that might help us reproduce, thanks in advance!

    regards!

    /Ole
    eviware.com