tags:

views:

39

answers:

1

i've got a webservice that is running on my local iis. Now i am trying to consume this webservice from a windows application.

I've added loggin in the web service that i am sure it is actually returning the data and it is.

But when i try and retreive it from my application it returns an empty datatable.

Any suggestions It actually breaks at where you get the datarow sins there are no data in the dattaable.?

PayM8Service payM8Service = new PayM8Service();

      localhost.PayM8DataSet.PayM8DetailsGetDataTable payM8DetailsGetDataTable = payM8Service.GetPayM8Details(999999999, "631023012");
      localhost.PayM8DataSet.PayM8DetailsGetRow row = (localhost.PayM8DataSet.PayM8DetailsGetRow)payM8DetailsGetDataTable.Rows[0];

      decimal asd = row.Arrears;
      decimal asda = row.Balance;
+1  A: 

The DataTable, DataRow, DataView, and DataViewManager objects cannot be serialized and cannot be returned from an XML Web service. To return less than a complete DataSet, you must copy the data that you want to return to a new DataSet.

http://support.microsoft.com/kb/306134

Cobus