@RequestMapping( value = "", method = RequestMethod.POST, consumes = "application/json", produces = "application/json") @ResponseBody public PurchaseRequest add(@RequestBody PurchaseRequest purchaseRequest) throws WebServiceException { System.out.println("AuthorizationRequestController.add [" + purchaseRequest.toString() + "]"); PurchaseRequest response = purchaseRequestManager.add(purchaseRequest); return response; }
@RequestMapping( value = "/{id}", method = RequestMethod.PUT, consumes = "application/json", produces = "application/json") @ResponseBody public PurchaseRequest update( @PathVariable String id, @RequestBody PurchaseRequest purchaseRequest) throws WebServiceException { System.out.println( "AuthorizationRequestController.update [" + purchaseRequest.toString() + "]"); PurchaseRequest response = purchaseRequestManager.update(id, purchaseRequest); return response; }