Service Virtualization

 View Only
  • 1.  No Session ID No session identified

    Broadcom Employee
    Posted Sep 10, 2019 03:35 PM
    I've imported RRpairs that resulted in 2+ transactions (in Conversation 1, no stateless)
    The 1st transaction is a standard authentication handshake followed by a GET request for a page of data.
    The client successfully handshakes [POST] with the VSE for a sessionID with the provided credentials.
    That sessionID is passed into the subsequent GET which is failing for reasons thatI don't understand (I think related to the sessionID).

    Q: When processing a conversation, is the session token matched in a manner similar to argument matching?
    2019-09-10 18:20:50,989Z (14:20)[tunnel_perf [VS_tunnel_perf_Run]/1] INFO - Inbound Request {"id":0,"operation":"POST /dataservice/j_security_check/","arguments":{"j_username":"capm","j_password":"capm"}}
    2019-09-10 18:20:51,002Z (14:20)[tunnel_perf [VS_tunnel_perf_Run]/1] INFO - New session New session created for key: f75Ko3425aal40b05P5dq_oSi5GuZff40gNIxMuh_098fe480-2140-2625-3387-788689a51175
    2019-09-10 18:20:51,002Z (14:20)[tunnel_perf [VS_tunnel_perf_Run]/1] INFO - Conversation Starting in: {"id":15747,"name":"Conversation 1"}
    2019-09-10 18:20:51,002Z (14:20)[tunnel_perf [VS_tunnel_perf_Run]/1] INFO - Session Response Lookup Specific conversational match: {"id":27113,"request":{"id":27114,"matchTolerance":"EXACT","operation":"POST /dataservice/j_security_check/","arguments":{"j_username":"capm","j_password":"capm"}}}
    2019-09-10 18:20:51,002Z (14:20)[tunnel_perf [VS_tunnel_perf_Run]/1] INFO - Response Lookup Completed
    2019-09-10 18:20:51,029Z (14:20)[tunnel_perf [VS_tunnel_perf_Run]/1] INFO - Inbound Request {"id":0,"operation":"GET /dataservice/data/device/statistics/approutestatsstatistics/","arguments":{"startDate":"2019-06-06T16:33:24","endDate":"2019-06-06T17:03:24","count":"1000"}}
    2019-09-10 18:20:51,029Z (14:20)[tunnel_perf [VS_tunnel_perf_Run]/1] INFO - No Session ID No session identified
    2019-09-10 18:20:51,029Z (14:20)[tunnel_perf [VS_tunnel_perf_Run]/1] INFO - No Stateless Match Could not match a stateless transaction
    2019-09-10 18:20:51,029Z (14:20)[tunnel_perf [VS_tunnel_perf_Run]/1] WARN - No Match Request <?xml version="1.0" ?>


    The following is the output from a python based test client:

    09-10-19_14:20:50 repeat delay 500ms

    09-10-19_14:20:50 start iteration 1
    09-10-19_14:20:50 00000 request URL: https://servicesim:8600/dataservice/j_security_check
    09-10-19_14:20:50 00000 request HDR: Content-type = application/x-www-form-urlencoded
    09-10-19_14:20:50 00000 request BODY: j_username=capm&j_password=capm
    09-10-19_14:20:50 00000 sending request ...
    09-10-19_14:20:51 00000 authentication SUCCESS cookie="JSESSIONID=g5fJt8A43ahy6Ca83N9ii_pOj5YvXsd8DhOSrUkx.550bb896-65b5-4722-9355-12bf86a5a5c6; path=/; secure; HttpOnly"
    09-10-19_14:20:51 00000 BEGIN
    09-10-19_14:20:51 00001 request URL: https://servicesim:8600/dataservice/data/device/statistics/approutestatsstatistics?startDate=2019-06-06T16:33:24&endDate=2019-06-06T17:03:24&count=1000
    09-10-19_14:20:51 00001 request HDR: Cookie = JSESSIONID=g5fJt8A43ahy6Ca83N9ii_pOj5YvXsd8DhOSrUkx.550bb896-65b5-4722-9355-12bf86a5a5c6; path=/; secure; HttpOnly
    09-10-19_14:20:51 00001 sending request ...
    09-10-19_14:20:51 00001 HTTP ERROR <html>
    <head><title>404 Not Found</title></head>
    <body>
    <h1>Not Found</h1>
    <p>The requested URL was not found on this server.</p>
    <hr/>
    <p><i>The DevTest VSE service could not match your request to a recorded request.&nbsp; Consider expanding your service image.</i></p>
    <br/><font size="-2">Produced by a DevTest virtualized web server.</font>
    </body>
    </html>

    HTTP Error 404: Not Found





  • 2.  RE: No Session ID No session identified
    Best Answer

    Posted Sep 11, 2019 04:00 AM
    Hi Frederick,

    I was able to replicate the scenario and find a resolution as well. The error was observed when we are not passing the JSessionID in the meta/header of next request (which is received as part of the first request). If you pass the same Jsession under Header Cookie, you will get the response instead of 404.

    PFB the parameter i used in second request (value from 1st response is used)
    Key : Cookie 
    Value : JSESSIONID=15ls14xqdc9k0v19ca8g2k6w846zbc22

    Thanks.
    Vaibhav J