irule to insert action parameter inside Content-Type header for xml request
Hello
we have a lot of xml services using soap version 1.2, im facing issue regarding validate soap action header using xml profile.
To summarize, while SOAP 1.1 would have these HTTP headers:
Content-Type: text/xml
SOAPAction: "http://example.com/ticker"
A SOAP 1.2 message would have the following:
Content-Type: application/soap+_xml; action="http://example.com/ticker"
our client software is not sending action parameter inside Content-Type header and it's to hard to apply changes on the code level
http header is look like this: Content-Type: application/soap+_xml; charset=utf-8
so i want to insert action parameter inside Content-Type header to be: Content-Type: application/soap+_xml; charset=utf-8; action=";
sample of the request
POST /xxyyzz/Service.svc HTTP/1.1
Content-Type: application/soap xml; charset=utf-8
Host:
Content-Length:
Expect: 100-continue
Accept-Encoding: gzip, deflate
X-Forwarded-For:
http://tempuri.org/IACHService/SendEchoResponse
`
so i want to match string after "Action s:mustUnderstand="1">[http://tempuri.org/IACHService/"](http://tempuri.org/IACHService/); then inject it to http header to be look like this
if:
` http://tempuri.org/IACHService/Something
Content-Type: application/soap xml; charset=utf-8; action=http://tempuri.org/IACHService/Something