I've to get data from web service. But web service request is serialized instance of C# class DataTable. Is there any ability to convert it into any java class?
Thanks
I've to get data from web service. But web service request is serialized instance of C# class DataTable. Is there any ability to convert it into any java class?
Thanks
(I'm assuming the server uses the default .NET serializer.)
The .NET and Java serializer are incompatible, so you can't deserialize the C# class to Java.
To connect the C# server to the Java client, you have to use a compatible serialization library on both platforms. One example is WOX, as of this answer to a similar question. (This is an XML serializer, so there will be considerable overhead.)
As pointed out in other answers you need to use a cross platform serialization library like wox (https://github.com/codelion/wox). Wox will allow you to serialize your objects in Java and deserialize them in C# (or vice versa).
You could use a
Code:
java.sql.ResultSet
object which is pretty close to what you want in C#.
Something like
Code:
Statement s = conn.createStatement(); ResultSet rs = s.executeQuery("select * from generic_table"); ResultSetMetaData md = rs.getMetaData();