RequestBody « Web « Spring Q&A





1. Problem with JAXB and @RequestBody    forum.springsource.org

Problem with JAXB and @RequestBody I'm using a controller that accepts POST requests with XML payload and uses JAXB with schema validation enabled to unmarshal. I use several schemata, my marshaller ...

2. Custom Parsing of RequestBody    forum.springsource.org

The system I am developing needs to be able to support multiple versions of a particular XSD in the @RequestBody. Is there a way to extend the current serialization classes to ...

3. @RequestBody 'validation' in spring 3.0.5    forum.springsource.org

@RequestBody 'validation' in spring 3.0.5 I have a REST controller and am trying to ensure that the request body is truly of the type I think it will be. Unfortunately my ...

4. Using a custom JsonDeserializer with @RequestBody    forum.springsource.org

Using a custom JsonDeserializer with @RequestBody Hello everyone, I'm trying to use JsonDeserializer on @RequestBody parameter for hours, I've read a lot about custom mappings and MessageConverters and because I'm not ...

5. @RequestBody unable to unmarshall    forum.springsource.org

@RequestMapping(value = "/fetchProcessors/", method = RequestMethod.GET) public ModelAndView fetchProcessors() { ... } @RequestMapping(value = "/saveProcessor", method = RequestMethod.POST) public ModelAndView saveProcessor(@RequestBody Processor processor) { .... }

6. @RequestBody unable to bind to XStream POJO    forum.springsource.org

Trying to post an xml data to spring rest api as given below: @RequestMapping(value = "/views/store",method=RequestMethod.POST) @XmlMimeType(value="application/xml") public View addStore(@RequestBody StoreVO store){ System.out.println(store.getName()); } StoreVO @XStreamAlias("store") public class StoreVO{ } Request ...

7. Spring @RequestBody and @RequestParam    forum.springsource.org

Spring @RequestBody and @RequestParam Hello, I've been looking for a good explanation of @RequestBody and @RequestParam and almost understand the two. @RequestBody is an annotation that goes behind a type/variable combination ...

8. Any solutions for using @Valid with @RequestBody    forum.springsource.org

9. How to test @RequestBody?    forum.springsource.org

How to test @RequestBody? One of the controller's methods is: @RequestMapping(value = "/person", method = RequestMethod.POST) @ResponseBody public Person createFromJson(@RequestBody Person person) { ... return personCreated; } The messageConverters have only ...





10. ensuring that requestbody has set the parameters required    forum.springsource.org

Is there any way to specify that a field in the requestbody is required to be set. For example - Code: ...... @RequestMapping(value = "/", method=RequestMethod.POST, headers="content-type=*/*") public ModelAndView createContact(@RequestBody ContactView ...