views:

18

answers:

1

Hi, I am using spring 3 controllers with a flex client. I am now using @RequestBody in order to pass xml's to the server. How can i pass additional parameters?

Thank you.

+1  A: 

You can mix and match easily enough:

public String handle(@RequestBody String xml, @RequestParam String x, @RequestParam String y) {
   ...
}
skaffman
but how do i differentiate the parameters from the body? (if using POST). The body will contain the xml, so where do the params go?
Noam Nevo
@Noam: They must go in the URL, they can't be POST parameters. If this is your question, then it has nothing to do with Spring, it's a more basic question of mixing POST parameters with a request body.
skaffman
Thank you skaffman, that was not clear to me. I thought i could mix the body and the params.
Noam Nevo