title: Magento Soap API V2 Response Content Length Incorrect
body: <p>We are trying to connect our magento installation with a third party stock management app(built on .net).  But the sync is not working, the third party tells me that the soap api is returning an empty response.</p>
  
  <p>I have been pulling my hear out, because whenever I make anything in PHP the API works fine.  In addition inventory updating works fine, but retrieving order/invoice information does not (well it actually does occasionally 1% of the time)</p>
  
  <p>With the intermittent nature we felt that it must be a network issue, but after lots of searching and adding mage::log() into the core api files I can see that the connection is happening and further more the response object is being created by Magento.</p>
  
  <p>So my deduction as that something was not right with the SOAP API (I am using version 2)</p>
  
  <p>I have installed soapUI and setup our integration, it correctly receives the methods from the WSDL file but when I try to access the "login" method I get an empty response, even when I put in the incorrect login details it is empty.</p>
  
  <p>soapUI outputs the following error:</p>
  
  <p><strong>ERROR:An error occured [Premature end of Content-Length delimited message body (expected: 267; received: 266], see error log for details</strong></p>
  
  <p>So it seems as though there is an issue with the http headers, some functions are able to return a response (of course without the login hash it is just invalid, but at least it is a response).  From my (exceedingly limited) understanding of java and .net, they are much stricter on these things than php which would indicate why a php integration would have no issues.</p>
  
  <p>Can anyone advise me why this error would occur and how to fix it?</p>