I have a Web Service that fetches some data from the database as an ArrayList of ObjectX where ObjectX has fields that holds the data read from the database. How should the response be such that it is easily interpretable by any client (.NET or any client as a mater of fact). In the end they are simply XML response but I would like to find out an easy way of representing this List of ObjectX. Any suggestions?
I have a Web Service that fetches some data from the database as an ArrayList of ObjectX where ObjectX has fields that holds the data read from the database. How should the response be such that it is easily interpretable by any client (.NET or any client as a mater of fact). In the end they are simply XML response but I would like to find out an easy way of representing this List of ObjectX. Any suggestions?
Hi Joe,
In order to ensure interoperability Sun and Microsoft involved in WSIT/WCF projects. If you look into WSIT, documentation, you will understand how the mapping goes between Java and .Net world.
One of the benefits of WS is their cross-platform and cross-language compatibility, so transferring Java-specific data types is not a good idea. Use arrays instead of Collections, and make sure that all objects (including nested ones) follow JavaBean conventions.
Arrays of objects that follow JavaBean conventions. If you implement it that way, the WSDL of the service should show nicely cross-platform compatible XSD types.