I have a C# webservice that a C#-client can access. I wish to create a java-client that can recieve data from the same Webservice. The Webservice has a data access layer that collects information from a foreign database. My problem is that the C#-webservice return type is not compatible with the java-client. Heres my example code:
public DataTable EmployeeNames()
{
Connect();
DataSet dataset = new DataSet();
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = new SqlCommand("SELECT [First Name], [Last Name] FROM [dbo].[CRONUS Sverige AB$Employee]", con);
adapter.Fill(dataset);
DataTable datatable = dataset.Tables[0];
Close();
return datatable;
}
As you can see, this webmethod returns a DataTable, which as to my understanding, Java can not process. Same goes for DataSet. I've tried converting the data to a List/Array etc but then I get problems with the columns (what do I do with the column names for example?). I'm out of options here, any help is appreciated.
P.S. The C# client works perfectly.