I need to consume a web service in VS 2010 using VB.NET that gives a result of a class type.
I've already added the reference and called it with:
Dim mag As New Magento.ecommerce
I can create a variable as the class:
Dim Stockcodes As New List(Of Magento.clsStockcode)
I just don't understand now how to make my Stockcodes variable get the data from the Web Service.
I've tried variations of:
Stockcodes = mag.ReturnNewStockodes("admin", "password")
and
Stockcodes.Add(New Stockcodes(mag.ReturnNewStockodes("admin", "password"))
but really I'm not sure what I'm doing.
I'm guessing what I need is the result of the Web Service as a type of dataset but I'm not sure.
The class is:
<clsStockcode>
<_Stockcode>string</_Stockcode>
<_Description>string</_Description>
<_CostPrice>string</_CostPrice>
<_PriceExclusive>string</_PriceExclusive>
<_PriceInclusive>string</_PriceInclusive>
<_TaxClass>string</_TaxClass>
<_QtyOnHand>string</_QtyOnHand>
<_IsBlocked>string</_IsBlocked>
</clsStockcode>