I am a bit confused about what standard restful service call output is ? I mean for example, my current web service,
This looks pretty ok. But what I am missing is seems the (error)messages from the server, may be the resultset size and things like that. I really have no clue what all addons like these should be included.
Any pointers/samples would be a great help. Also an idea about the gnrl class heirarchy for this to achieve.
There's no standard of what a REST response looks like. An error message would generally only be returned if there is an error, not if there are results like in your example. If you want metadata, how about a response like this:
Joined: Jun 02, 2010
yeah, I guess metadata is the right word. Thanks.
Now there are couple of questsions-
1. What would the general metadata look like ?
2. How do I embed that metadata of every response.
Bit of clarification on #2.
I have java objects say for example Book. My spring framework serializes it and converts it to <book> ..... </book>
set of books would be returned as List.
That is <list> <book>..</book><book>..</book><book>..</book><book>..</book></list>
so do I create a new class metadata and make every other class inherit that ?
1. Since a response can contain ANY kind of content - XML, binary, whatever, there is no general content metadata.
2. Instead, use the HTTP headers to communicate additional information, thats the whole point of REST, to use the existing HTTP protocol.
For example your response headers should use the correct response code and include a content type and length.