I wrote a program. It is my first program to access to the API when I am done and compiled it, it says the following error in
Error 1 Cannot implicitly convert type 'SOAPTesting.ServiceReference2.salesOrderListEntity[]' to 'SOAPTesting.ServiceReference2.salesOrderEntity[]' G:\VISUAL STUDIO 2013 PROJECT WORKSPACE\HarshiniPROJECT\SOAPTesting\SOAPTesting\Program.cs 29 38 SOAPTesting
So how to fix this error here is my program,
static void Main(string[] args)
{
Mage_Api_Model_Server_V2_HandlerPortTypeClient mservice = new Mage_Api_Model_Server_V2_HandlerPortTypeClient();
string mlogin = mservice.login("dileepa", "takastakas");
Debug.WriteLine(mlogin);
filters mf = new filters();
complexFilter[] cpf = new complexFilter[1];
complexFilter mcpf = new complexFilter();
mcpf.key = "increment_id";
associativeEntity mas = new associativeEntity();
mas.key = "gt";
mas.value = "1008001";
mcpf.value = mas;
cpf[0] = mcpf;
mf.complex_filter = cpf;
salesOrderEntity[] soe = mservice.salesOrderList(mlogin, mf);
if (soe.Length > 0)
{
foreach (salesOrderEntity msoe in soe)
{
try
{
Debug.WriteLine("" + msoe.billing_firstname + " " + msoe.subtotal);
}
catch (Exception merror)
{
Console.WriteLine("" + msoe.order_id + "" + merror.ToString());
}
}
}
Console.ReadLine();
}