Reputation: 4556
I have a RestFull grails api that i expose through grails Controller.
I need to automatically bind the xml data sent in a POST request.
I don't think using groovy bindData(object,params)
works as the params
reference seems not having the xml elements. i use the parseRequest=true
in the UrlMappings but yet the params
Object does'nt have the xml elements.
am i missing some other config so that my params object get automatically populated with the xml body elements?
Upvotes: 2
Views: 3557
Reputation: 4556
it seems the right way to do it is to use:
request.reader.text
to get the raw xml. the other methods were not successfull for me.
Upvotes: 7