title: WebMethod: Turn off XML
body: <p>I built an ASP.NET Web Service Application (.NET 3.5) with a simple WebMethod:</p>
  
  <pre><code>[WebMethod]
      public string GetToken()
      {
         return "Hello";
      }
  </code></pre>
  
  <p>The response looks like this:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8" ?&gt; 
    &lt;string xmlns="http://www.mywebsite.com/"&gt;Hello&lt;/string&gt;
  </code></pre>
  
  <p>This works fine. However, one of my customers can't deal with the XML-Wrapper around the result string. Is there a way to turn off the XML and just return the pure string "Hello" (without quotation marks of course ;-)).?</p>