Forum Discussion
dmpenn_184841
Nimbostratus
Jan 29, 2015Extract Session ID from SOAP body using iRule
Hello,
I am trying to find out how to extract information from the SOAP body in an HTTP request. Below is an example of the Session ID information that I'm trying to extract from the SOAP body:...
bonny_11145
Jan 30, 2015Historic F5 Account
Hi dmpenn,
You could work off getting the soap body into a variable and then working from it like so:
...
set payload [HTTP::payload]
set key ""
set ekey ""
set keylen [string length $key]
set pos [expr {$keylen + [string first $key $payload] } ]
set epos [string first $ekey $payload $pos]
set id [string range $payload $pos [expr {$epos -1]]
Hope this helps
Cheers,
Bonny
- bonny_11145Jan 30, 2015Historic F5 Accountsorry ekey should read `set ekey ""`
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