Forum Discussion
Chris_Schaerli_
Nimbostratus
Jun 18, 2007Tracking session in soap header?
I have been going though the board looking for something to help me with a session persistence issue. I have some transactions I need to set persistence on and I can’t use source IP or cookie. The only thing I have been able to find is a value in the soap header that is unique per session. I have not been able to figure out how to pull that out.
Can anyone suggest a place to start? Here is a snip of the soap header. I need to track on the “soapenc” value.
Jz8rPz8/eAVeJT8/Pz8/KT8/PzA/BD8/Pxd4Pz9LPxg/P2M/Pz8/Pz8/P1I/LT8rP18=
25 Replies
- Deb_Allen_18Historic F5 AccountWithout seeing the request, the response, and the iRule together, it's difficult to tell what's going on...
- Chris_Schaerli_
Nimbostratus
Deb,
The last response from the server does not include a soap session value. Can we default to another method of persistence? There does not look like there is anything I can use in the last request for a continuation of the soap session.
This is what my Irule looks like.
when HTTP_REQUEST {
collect the payload containing the POST data
HTTP::collect [HTTP::header Content-Length]
}
when HTTP_REQUEST_DATA {
persist on data beginning the 59th character following the 'xmlns:soapenc=' string & ending @ "<" char
and follow existing persistence record or create a new one
persist uie [findstr [HTTP::payload] xmlns:soapenc= 58 <]
log local0. [findstr [HTTP::payload] xmlns:soapenc= 58 <]
}
when HTTP_RESPONSE {
set SessionId [findstr [HTTP::payload] xmlns:soapenc= 58 <]
log local0. "Response SessionId is: $SessionId"
if { $SessionId != "" }{ persist add uie $SessionId }
}
Here is a sample of the last response header value.
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">:findPublicIdFOOResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://api.FOO.com/">xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>licIdFOOResponse> - afraser10_2031
Nimbostratus
All,
Any suggestions on creating an I-rule that addresses if the string I am searching for is blank, null,or not even an integer.I also was thinking that this would igonore persistence if the above condition is met.
This is what i have so far
when HTTP_REQUEST {
collect the payload containing the POST data content length is to tell LTM to stop collecting data
HTTP::collect [HTTP::header Content-Length]
}
when HTTP_REQUEST_DATA {
look for persistence data beginning the 16th character following the 'visitorID "<" char
and follow existing persistence record or create a new one
set visitorId [ string trim [findstr [HTTP::payload] "visitorId" 16 ""]]
if {string is integer -strict $visitorId}
{persist uie $visitorId
log local0. "[findstr [HTTP::payload] "visitorId" 16 ""]"
}
} - Elasa_26701
Nimbostratus
Hi guys..
have you test these codes finally?
I suppose "when HTTP_RESPONSE_DATA" is correct
am I right?
Thanks
Ellie - Dale_Bruso_2100
Nimbostratus
I have a very similiar problem to the one described in this post in that I need to persist on a value called ContextID. Here is an example from the SOAP header: 36X: Did anyone on this question ever get this to work properly? I would appreciate any help with this. We are currently running 11.6.0 HF3
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
