title: C# SOAP - Error in deserializing body of reply message (Magento API)
body: <p>I'm trying to connect a C# app to Magento 1.6 (through Magento SOAP V2) using the following code:</p>
  
  <pre><code>using (Mage_Api_Model_Server_Wsi_HandlerPortTypeClient proxy = new Mage_Api_Model_Server_Wsi_HandlerPortTypeClient())
  {
    string sessionId = proxy.login("XXXXXXX", "XXXXXXXXXXX");
    Console.WriteLine(sessionId);
  }
  </code></pre>
  
  <p>and I get the following error:</p>
  
  <pre><code>Error in deserializing body of reply message for operation 'login'.
  </code></pre>
  
  <p>I used Fiddler to inspect the transfer and this is the result:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento"&gt;
  &lt;SOAP-ENV:Body&gt;
  &lt;ns1:loginResponseParam&gt;
  &lt;result&gt;fc094df96480dbbcdXXXXXXXXXXXXXXX&lt;/result&gt;
  &lt;/ns1:loginResponseParam&gt;
  &lt;/SOAP-ENV:Body&gt;
  &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  
  <p>I'm using:</p>
  
  <ul>
  <li>Magento V 1.6</li>
  <li>Magento SOAP V2</li>
  <li>WS-I Compliance (ie System/Configuration/Services/Magento Core API/WS-I Compliance is set to Yes)</li>
  <li>Content type fix: <a href="http://www.klotin.com/content/content-type-error-consuming-magento-15-webservices-net" rel="noreferrer">Content Type Error Consuming Magento 1.5 Webservices from .Net</a></li>
  <li>VS 2010</li>
  <li>.Net 3.5</li>
  </ul>
  
  <p>Any ideas how I can fix (or debug) this problem?</p>