Forum Discussion
gamm_31377
Nimbostratus
Jun 18, 2014iRule STREAM:expression problem
Hello,
I try to modify the payload of a HTTP SOAP Request by an iRule.
I try to use STREAM::expressions to modify.
The first expression works.
The second expression works.
But a combination of both d...
gamm_31377
Nimbostratus
Jun 23, 2014I fixed the bug it was a masquerading problem, but I still get an error: Malformed document Document has no root element
The HTTP Request looks good, but I'm missing the element content-legth. STREAM profile and HTTP_Rechunk are added to the virtual server.
POST /axis/services/OSMCService HTTP/1.1 User-Agent: kSOAP/2.0 SOAPAction: login Content-Type: text/xml Connection: close Host: 172.30.245.13 Accept-Encoding: gzip
panzer@system01*Test!BwAAAAAKVC1Nb2JpbGUgRAEAAAAQU2Ftc3VuZyBHVC1JOTAwMQIAAAAGSkRR
MzlFAwAAAAdBbmRyb2lkBAAAAAU0LjIuMgUAAAART3BlblNjYXBlIE1vYmls
ZSAGAAAABTcyMzkw0+491754392793
when RULE_INIT {
set static::debug 1
}
when HTTP_REQUEST {
if { [HTTP::header Content-Type] contains "text/xml" } {
if {$static::debug}{log local0. "payload before: [HTTP::payload]"}
switch -glob [HTTP::uri] {
"*OSMCService" {STREAM::expression {@id=.*?OSMCService">@xmlns:n0="http://osmc.services.osmc.synium.com">@ @:i=@:xsi=@ @i:@xsi:@ @:d=@:xsd=@ @d:@xsd:@ @:c=@:soapenc=@ @ c:@ soapenc:@ @:v@:soapenv@ @v:@soapenv:@}}
}
STREAM::enable
} else {
STREAM::disable
}
}
when HTTP_RESPONSE {
STREAM::disable
}
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