Hi all,
I’m trying to create a very simple Web Service using an XML port to retrieve a customer list. I can find loads of examples for writing data to NAV using XML ports, but not so many when it comes to reading data from NAV.
I think my problem is the C# code as I don’t have much experience with C# (yet).
Can anyone help me out - or perhaps point me in the direction of an example elsewhere?!
My C# code and XMLPort is attached below.
Cheers
Martin
0
Comments
GetCustomer CustomerRoot = new GetCustomer();
CustXMLPortWS2.TestCustXMLPort(ref CustomerRoot);
// List<Customer> Cust = new List<Customer>();
foreach (Customer c in CustomerRoot.Customer)
{
Console.WriteLine("Customer Name: {0}", c.Name);
}
And no need to create a new collection either...
Best regards
Martin