title: WCF Soap Response - Remove "Result" node (Format WCF Response)
body: <p>I am converting a legacy web service to a WCF service. This service currently is being used by front end application. But as of now the front end has intention to consume the new WCF service so instead we plan on rerouting the request to our new service from IIS. The catch here is that the new WCF service should be able handle the old input request and should be able to send back the response in the exact same format.</p>
  
  <p>I didnt have any trouble handling the input request but I am facing issues trying to return message in old format. My current service is returning SoapResponse in below format (I am nout using any message contracts/DataContracts as I am using the same return type&amp;Input parameter used in the Old legacy code):</p>
  
  <pre><code>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;UserCheckResponse xmlns="Abc.SomeNamespace"&gt;
       &lt;UserCheckResult a:Direction="Response" a:Purpose="UserCheck" xmlns:a="Abc.SomeNamespace"&gt;
          &lt;a:KV a:Key="TraceID" a:Value="546546565" /&gt;
          &lt;a:KV a:Key="Response" a:Value="78954" /&gt;
          &lt;a:KV a:Key="UserVerified" a:Value="N" /&gt;
          &lt;a:KV a:Key="TryAgain" a:Value="Y" /&gt;
          &lt;a:KV a:Key="DataSource" a:Value="NA" /&gt;
       &lt;/UserCheckResult&gt;
    &lt;/UserCheckResponse&gt;
  </code></pre>
  
  <p>
   </p>
  
  <p>I Want it to look like below (I dont want the UserCheckResult node in the response instead i want the key value pairs directly under UserCheckResponse node): </p>
  
  <pre><code>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;UserCheckResponse a:Direction="Response" a:Purpose="UserCheck" xmlns:a="Abc.SomeNamespace"&gt;
          &lt;a:KV a:Key="TraceID" a:Value="546546565" /&gt;
          &lt;a:KV a:Key="Response" a:Value="78954" /&gt;
          &lt;a:KV a:Key="UserVerified" a:Value="N" /&gt;
          &lt;a:KV a:Key="TryAgain" a:Value="Y" /&gt;
          &lt;a:KV a:Key="DataSource" a:Value="NA" /&gt;
    &lt;/UserCheckResponse&gt;
  </code></pre>
  
  <p>
  </p>