Changing the Prefix in WCF Response

While calling from my Web Application, WCF response i am getting is :

<s:Envelope xmlns:s="">
  <s:Header />
   <getSOAPDataResponse xmlns="http://localhost/WebServices">
   <getSOAPDataResult> INFORMATION </getSOAPDataResult>

The Web Application is very old and has some hard coded stuff that looks for "Soap" as prefix in Response. Previously Web Services were used but now Web Services has been migrated to WCF Services.

The expected response from WCF is something like this:

<Soap:Envelope xmlns:s="">
 <Soap:Header />
  <getSOAPDataResponse xmlns="http://localhost/WebServices">
  <getSOAPDataResult> INFORMATION </getSOAPDataResult>

So i need to change the WCF Response Prefix "S" to "Soap". How can it be done. Any help will be highly appreciated.

Thanks in advance.


This blog post addresses your exact problem. You basically need to create a custom message encoder. Be aware though, if you're using WsHttpBinding with message security, the approach in the post won't work. If you're using BasicHttpBinding, refer to the comments at the end of the post (you need to ensure you're replacing the right text, as the basic binding uses SOAP 1.1 and the WS binding uses SOAP 1.2).

Need Your Help

passing parameter via url in Laravel4 is not working

php laravel-4

It is possible to pass parameter to the page using controller via -&gt;with() for example

Slideable SplitViews similar to the AutoScout24 App

objective-c ipad draggable uisplitviewcontroller

i am try to reproduce the same function as in the AutoScout24 iPad App. I think its only a UIViewController with some special actions. I would add the other ViewControllers to the View from the