I\'m developing REST services which have to receive multiple info. In this case, two objects and an attribute.
This is the javascript where I\'m testing the POST req
You can create a java bean(POJO) containing all the objects like..
class JavaBean{
private User user;
private UserTOSubscribe userToSubscribe;
private Long openId;
// getter and setter
}
and pass this bean in to the Web service. so web service looks like..
@RequestMapping(method=RequestMethod.POST, value="/subscribeUser.json")
public @ResponseBody Message subscribeUser(@RequestBody JavaBean javaBean) {
...
}