title: How to return a specific SOAP response from a WCF service?
body: <p>I have a WCF method which currently returns a string like so:</p>
  
  <pre><code>string CreateDesign(string UID, string TemplateName)
  </code></pre>
  
  <p>The retruned string is created by this method:</p>
  
  <pre><code>string RequestProcessed(string status, string UID)
      {
          XDocument doc = new XDocument(
              new XElement("RequestProcessed",
                  new XElement("Status", status),
                  new XElement("UID", UID)));
  
          return doc.ToString();
      }
  </code></pre>
  
  <p>The response that I got from using SOAPUI is like this:</p>
  
  <pre><code>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Body&gt;
    &lt;CreateDesignResponse xmlns="http://tempuri.org/"&gt;
       &lt;CreateDesignResult&gt;&lt;![CDATA[&lt;RequestProcessed&gt;
         &lt;Status&gt;OK&lt;/Status&gt;
         &lt;UID&gt;FolderName&lt;/UID&gt;
       &lt;/RequestProcessed&gt;]]&gt;&lt;/CreateStandardResult&gt;
    &lt;/CreateStandardResponse&gt;
   &lt;/s:Body&gt;
   &lt;/s:Envelope&gt;
  </code></pre>
  
  <p>The client is expecting it like this:</p>
  
  <pre><code>&lt;soap:Body&gt;
   &lt;m:RequestProcessed xmlns:m=" "&gt;
    &lt;m:Status&gt;&lt;/m:Status&gt;
    &lt;m:UID&gt;&lt;/m:UID&gt;
   &lt;/m: RequestProcessed &gt;
  &lt;/soap:Body&gt;
  </code></pre>
  
  <p>What should I do to make the WCF service return the response like that?
  I am struggling with this for quite sometime now, appreciate any help.</p>
  
  <p>Regards.</p>