How can I Convert XML to an Object using Spring 3.0 mvc while making RESTful request
- by brock
Hi,
I'm using the Spring 3.0 RC1 framework and I'm currently testing out Spring mvc. I wanted to use Spring mvc to handle restful requests. I have set up my controller to handle the URI request. I am passing in xml with the request. So on the controller I have a method like follows:
public void request(RequestObject request) {
doSomething();
}
I am having a hard time converting the xml to the RequestObject. I haven't seen much documentation on this and I was wondering if anyone could point me in the right direction. I'm guess that you would have to annotate the RequestObject using JAXB or something in order to tell Spring to convert the xml file to RequestObject but I'm not sure.
Thanks for all of your help!!