Reputation: 645
I have a web service that provides queries functionality using hibernate. A query can return multiple results - each results contains multiple parameters.
The question is: how should I return the result:
Which is better for performance - there might be lots of user doing request etc.
If better using the complex types - can give an example of using it - or a link to some info.
Thanks Yoav
Upvotes: 0
Views: 166
Reputation: 691645
Web services generally return results in a platform-independent, but structured way. XML and JSON are two frequent choices.
There are plenty of apis in Java to generate XML and JSON. Google for them. I like using JAXB for XML. Some APIs take JAXB-annotated objects and serialize them into JSON instead of XML.
Upvotes: 1