I’m developing API for booking(hotels, cars, apartments, etc.) system.
Response will be in XML but how to handle requests in the best way ?
Should they be an XML requests like on Travelfusion or RESTful like on Cleartrip ?
Service is written in Grails.
I’d take elements from each of the two approaches you referenced. GET’s and DELETE’s can use a simple query string approach for identifying the data to read or delete. You may only need to have a param called “id” in many cases.
PUT’s and POSTS’s can use an XML payload to better represent the underlying data structure and prevent long, confusing query strings.
Both approaches are made particularly easy given Grails data binding and Groovy XMLSlurper. In the end you can probably go either way and be fine.
Grails in Action (Chapter 11) has a pretty good section on REST and other remote access technologies- you might want to give it a look.