title: XML format in WCF REST request and response
body: <p>I have set up a WCF service that will accept both JSON and XML in the same method, and that supports both SOAP and REST. </p>
  
  <p>The JSON works fine, but I do not know how the XML should look. </p>
  
  <p>The interface looks like this:</p>
  
  <pre><code>[ServiceContract]
  public interface IWebService
  {
      [OperationContract]
      [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare)]
      string[] EchoArray(string[] stringArray);
  }
  </code></pre>
  
  <p>If possible, I would like to keep the XML as simple as possible, without namespaces, like this: </p>
  
  <pre><code>&lt;stringArray&gt;
      &lt;string&gt;hello&lt;/string&gt;
      &lt;string&gt;hola&lt;/string&gt;
  &lt;/stringArray&gt;
  </code></pre>
  
  <p>The response should be simple as well. </p>
  
  <p>If it makes any difference, I am doing it all in code, without any web.config. </p>
  
  <p>This is so I can use an Azure worker role. </p>