title: Webservices in Asp.net
body: <p>I have the following webmethod in my application</p>
  
  <pre><code>[WebMethod]
  public bool Test(string id)
  {
      return true;
  }
  </code></pre>
  
  <p>using WebRequest.Create(..) I get the following xml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;boolean xmlns="http://tempuri.org/"&gt;true&lt;/boolean&gt;
  </code></pre>
  
  <p>and using the following code</p>
  
  <pre><code> XmlSerializer ser = new XmlSerializer(typeof(bool));
   var result = (bool)ser.Deserialize(responseStream);
  </code></pre>
  
  <p>I get the following exception       </p>
  
  <ul>
  <li>"There is an error in XML document (2, 2)."</li>
  <li><code>&lt;boolean xmlns='http://tempuri.org/'&gt; was not expected.</code></li>
  </ul>