Hi,
After googling and experimenting all morning, perhaps some kind soul would be willing to help.
We have a web service that is routed through an Apache 2.2 on Windows. A correct SOAP Request would be
POST
http://myapache/cgi-bin/nph-owscgi.exe/olt_web/oltlogon HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "
http://127.0.0.1:5912"
<soapenv:Envelope …>
…
</soapenv:Envelope>
Note the SOAPAction RequestHeader. This tells the “nph-owscgi.exe” where to send the request so that the application server can process the request.
Some customers do not send us a SOAPHeader. In this case we would like to automatically set the SOAPHeader RequestHeader value.
Here an example of a Reqeust without a SOAPHeader:
POST
http://myapache/cgi-bin/nph-owscgi.exe/olt_web/oltlogon HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
<soapenv:Envelope …>
…
</soapenv:Envelope>
or
POST
http://myapache/cgi-bin/nph-owscgi.exe/olt_web/oltlogon HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
<soapenv:Envelope …>
…
</soapenv:Envelope>
Goal: to automatically set the SOAPAction if empty or missing.
Here what I would expect to work, but does not.
<Files "nph-owscgi.exe">
SetEnvIf SOAPAction ^h.*$ HAVE_SOAPAction
RequestHeader set SOAPAction "
http://127.0.0.1:5912" env=!HAVE_SOAPAction
</Files>
What I am trying to tell Apache is, if the SOAPAction RequestHeader starts with an “h”, then set the environment variable HAVE_SOAPAction. If the environment variable HAVE_SOAPAction is not set, then set the SOAPAction ReqeustHeader to the default value of "
http://127.0.0.1:5912".
Tried other
Unfortunately this is not working. The SOAPAction is always being overwritten.
Any tips what I am doing wrong? I only want to "RequestHeaser set" if the SOAPAction has not been sent or is empty.
Regards
Rudolf