How do I use HttpHandlers to create a proxy and change a SOAP request and response namespace?
Example…change this (1 line)
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Example1 xmlns="http://www.domain.com">
<DoSomething>string</DoSomething>
</Example1>
</soap:Body>
</soap:Envelope>
to this (1 line)
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Example1 xmlns="http://www.mydomain.com">
<DoSomething>string</DoSomething>
</Example1>
</soap:Body>
</soap:Envelope>
I havn’t managed to get this working in a single place yet 🙁
IHttpHandler allows you to modify the SOAPAction in the headers, but not the body of the soap message.
SoapExtension allows you to change the body of the soap message, but not the SOAPAction in the headers.
From my testing, you need to change both for it to work…
IHTTPHandler:
SOAPExtension:
Still trying desperately to get it all n one place, but I have got it working at least :/