If I understand correctly, in rest style, every query (that is, every action on every resource that does not modifies the resource's state) should be enconded in the querystring, using a get method, with no body at all...
am I right?
well, I have several applications that comunicate with the db thru an xml message that is handled by a visual basic 6 component.
the message for a query is something like this
<xml>
<service>account</service>
<resource>invoice</resource>
<action>query</action>
<parameters>
<page>1</page>
<page_len>10</page_len>
<order>date</order>
<fields>*</fields>
<conditions>
<date>2009-01-01..2009-01-31</date>
<customer_id>24</customer_id>
</conditions>
</parameters>
</xml>
right now we are in the process of redesigning our xml messages, and we'd like to do that in such a way that they could be easily mapped to a restFul interface.
in the previous example, we need the "conditions" tags in order to prevent colissions between the parameters and the conditions (ie, what happens if I have a field named "order", "page" or something like that...
we though about sending the paramaters with a prefix, something like
http://account/invoice/?_page=1&_page_len=10&_order=date&_fields=*&date=2009-01-01..2009-01-31&customer_id=24
and the xml would be something like
[...]
<_order>date</_order>
<_fields>*</_fields>
<date>2009-01-01..2009-01-31</date>
<customer_id>24</customer_id>
[...]
we are trying to define some really simple xml format for crud operations, and that the resulting xml could be easily maped to rest or json.
how would you map that kind of query in a rest application? is there some standard defined? or some page with crud rest / xml /json samples? how about returning error, or nested datasets?
thanks a lot...