I am connecting to a PHP web service which returns a complexType with in a complexType!
Basically it reurns an array of orders, each containing an array of products, now it works a treat in PHP with the client and server, however it only half works consuming it in .NET.
I try to access the array elements and it says they dont exist.
Now it all works until I try to access an element from the complexTpe (i.e. an order) using:
r.ordersData(0).orderTotal
VB.NET thinks it should be there from the WSDL but it is either not returned due to my web service (which it may well be) or I am trying to access it wrongly.
***
I forgot the error message is:
***
Thank you for any help you can provide, I am getting there though
Si
Basically it reurns an array of orders, each containing an array of products, now it works a treat in PHP with the client and server, however it only half works consuming it in .NET.
I try to access the array elements and it says they dont exist.
Code:
Dim s As New Marinespares.Admin
Dim sDate As String = Format(Now, "yyyy-mm-dd-hh:mm:ss")
Dim r As Marinespares.Orders = s.getNewOrders(sDate)
Label5.Text = r.requestDate
Label6.Text = r.totalOrders
Label7.Text = r.ordersData(0).orderTotal
ListBox1.Items.Add(Convert.ToString(r.ordersData(0).orderDate))
Now it all works until I try to access an element from the complexTpe (i.e. an order) using:
r.ordersData(0).orderTotal
VB.NET thinks it should be there from the WSDL but it is either not returned due to my web service (which it may well be) or I am trying to access it wrongly.
***
I forgot the error message is:
Code:
An unhandled exception of type System.NullReferenceException occurred in WeatherTestPHP.exe
Additional information: Object reference not set to an instance of an object.
Thank you for any help you can provide, I am getting there though
Si