Forum Discussion

Jacques_DL_3369's avatar
Jacques_DL_3369
Icon for Nimbostratus rankNimbostratus
Nov 25, 2017

Session ID Persistence based on Session id in Soap request.......

Hi can anyone help me. I'm trying to get an I rule to do Session id Persistence. The Session ID is contained in the tag of the SOAP request. also to have a web service timeout value of 300 seconds (5 minutes) set in the I rule. Below is a sample request and I would want to do persistence based on this request using the Session id.

 

 

http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ser=";

 

 

 

 

3 ..................[omitted rest of tags]

 

 

 

thanks allot any help will be appreciated

 

  • Hi can anyone help me. I'm trying to get an I rule to do Session id Persistence. The Session ID is contained in the tag of the SOAP request. also to have a web service timeout value of 300 seconds (5 minutes) set in the I rule. Below is a sample request and I would want to do persistence based on this request using the Session id.

     

    http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ser=";

     

     

     

     

    < sid>3< /sid> ..................[omitted rest of tags]

     

     

    in this example the Session id is 3 the Session id will change for every user login

     

  • Kel's avatar
    Kel
    Icon for Nimbostratus rankNimbostratus

    Try Using Universal Persistence with following iRule adapted from post ";

    ===

    when HTTP_REQUEST { 
        HTTP::collect [HTTP::header Content-Length] 
    } 
    when HTTP_REQUEST_DATA { 
        set soap_uri [HTTP::uri] 
        set soap_sid [findstr [HTTP::payload] "" 5 "<"] 
        log local0. "found request sessionID: $soap_sid in SOAP call: $soap_uri" 
        if { $soap_sid != "" } { 
            persist uie $soap_sid 
        } 
    } 
    when HTTP_RESPONSE { 
        set soap_sid [findstr[HTTP::payload] "" 5 "<"] 
        log local0. "found response sessionID: $soap_sid in SOAP response from: [LB::server addr]" 
        if { $soap_sid != "" } { 
            persist add uie $soap_sid 
        } 
    }