title: Magento SOAP V2 error (catalogInventoryStockItemList)
body: <p>I have an array with some products SKU called "items_estoque", which I fill in a loop from a specific DataTable called "dt":</p>
  
  <pre><code>Dim items_estoque(0) As String
  For Each linha As DataRow In dt.Rows
     If Not IsDBNull(linha("codigo_magento")) Then
         i += 1
         ReDim Preserve items_estoque(i)
         items_estoque(i) = linha("codigo_magento")
     End If
  Next
  </code></pre>
  
  <p>I then call the Magento API using the "<strong>catalogInventoryStockItemList</strong>" function:</p>
  
  <pre><code>Dim estoque = magentoV2_servico.catalogInventoryStockItemList(magentoV2_sessao, items_estoque)
  For Each item As MagentoV2_Temp.catalogInventoryStockItemEntity In estoque
      'Do stuff
  Next
  </code></pre>
  
  <p>And almost everytime I do this, I get an undefined error, independet of the SKU or array length. <a href="http://i.stack.imgur.com/OOycn.jpg" rel="nofollow">This is an example of the array content.</a></p>
  
  <p>The weird thing is that, if I before trying to get those two specific products from the example, make a random call using "<strong>catalogProductList</strong>", like (<code>Dim produtos = magentoV2_servico.catalogProductList(magentoV2_sessao, filters, "")</code>), <a href="http://i.stack.imgur.com/idTAV.jpg" rel="nofollow">I can then normaly go back to that same "<strong>catalogInventoryStockItemList</strong>" function and it will work.</a></p>
  
  <p>Why does that happen and, please, how can I solve it?</p>
  
  <p>Thanks</p>