title: Cannot get products in Magento 1.6.1.0's SOAP API's CatalogProductList when I have more than 25 products
body: <p>I’m trying to list all my products with the SOAP v2 interface in C# (.Net 4.0, VS 2010), using the WS-I compliant, WSDL generated version of the SOAP interface in Magento 1.6.1.0.</p>
  
  <p>I can retrieve products normally with my code (appended below) when I have fewer than 25 products. However, when I have 25 products or more, I get an error:</p>
  
  <pre><code>Unhandled Exception: System.InvalidOperationException: There is an error in XML 
  document (333, 2). ---&gt; System.Xml.XmlException: Unexpected end of file has occu 
  rred. The following elements are not closed: complexObjectArray, result, ns1:cat 
  alogProductListResponseParam, SOAP-ENV:Body, SOAP-ENV:Envelope. Line 333, positi 
  on 2. 
  at System.Xml.XmlTextReaderImpl.Throw(Exception e) 
  at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) 
  at System.Xml.XmlTextReaderImpl.ThrowUnclosedElements() 
  at System.Xml.XmlTextReaderImpl.ParseElementContent() 
  at System.Xml.XmlTextReaderImpl.Read() 
  at System.Xml.XmlTextReader.Read() 
  at System.Xml.XmlReader.MoveToContent() 
  at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderMagent 
  oService.Read32_catalogProductEntity(Boolean isNullable, Boolean checkType) 
  at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderMagent 
  oService.Read121_Item() 
  at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer86.De 
  serialize(XmlSerializationReader reader) 
  at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, St 
  ring encodingStyle, XmlDeserializationEvents events) 
  --- End of inner exception stack trace --- 
  at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, St 
  ring encodingStyle, XmlDeserializationEvents events) 
  at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClie 
  ntMessage message, WebResponse response, Stream responseStream, Boolean asyncCal 
  l) 
  at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN 
  ame, Object[] parameters) 
  at MagentoAPITest.mage.MagentoService.catalogProductList(String sessionId, fi 
  lters filters, String store) in ....\technology\c#\MagentoAPITest 
  \MagentoAPITest\Web References\mage\Reference.cs:line 1982 
  at MagentoAPITest.magentoHelper.GetProducts() in ....\technolo 
  gy\c#\MagentoAPITest\MagentoAPITest\magentoHelper.cs:line 62 
  at MagentoAPITest.Program.Main(String[] args) in ....g\technolo 
  gy\c#\MagentoAPITest\MagentoAPITest\Program.cs:line 30 
  Press any key to continue . . .
  </code></pre>
  
  <p>It doesn’t seem to matter what kind of products I’m creating; I’m always thrown this error.</p>
  
  <p>I can continue to add products; when I do so, the error changes slightly to (in the case of 50 products)</p>
  
  <pre><code>Unhandled Exception: System.InvalidOperationException: There is an error in XML 
  document (666, 2). ---&gt; System.Xml.XmlException: Unexpected end of file has occurred. The following elements are not closed: complexObjectArray, result, ns1:catalogProductListResponseParam, SOAP-ENV:Body, SOAP-ENV:Envelope. Line 666, position 2. 
  </code></pre>
  
  <p>I presume that this means that Magento is sending the appropriate data; however, I'm suspecting that C# isn't parsing the data correctly?</p>
  
  <p>For reference, I retrieve my products via: </p>
  
  <pre><code> public List&lt;mage.catalogProductEntity&gt; GetProducts()
          {
              //var result = ms.call(sessionID, "catalog_product.list", null);
  
  
  
              // retrieve products  
              mage.filters filter = new mage.filters();
              mage.catalogProductEntity[] products = new mage.catalogProductEntity[1];
              try
              {
  
                  products = ms.catalogProductList(sessionID, filter, "");
              }
              catch (System.InvalidOperationException e)
              {
                  Console.WriteLine(e.Message);
                  System.Xml.XmlException xe = (System.Xml.XmlException ) e.InnerException;
                  Console.WriteLine(xe.SourceUri);
                  throw;
              }
              foreach (mage.catalogProductEntity product in products)
              {
                  Console.WriteLine(product.product_id + ", "
                      + product.name + ", " 
                      + product.type + ", " 
                      + product.sku + ", "
                      + product.set + "");
  
              }
              List&lt;mage.catalogProductEntity&gt; ProductsList = new List&lt;mage.catalogProductEntity&gt;(products);
              return ProductsList;
          }
  </code></pre>
  
  <p>Does anyone know why this is happening?</p>
  
  <p>Thanks so much!</p>