Posts

Showing posts with the label issues in rest services

RESTful service with Spring3 annotations

Creating RESTful services @RequestMapping(value = {"restExampleString/{name}" }, method = RequestMethod.GET) public @ResponseBody String restExampleString(@PathVariable String name){ String returnText; returnText = "Welcome "+name+"."; return returnText; }  A simple method annotated with  @ResponceBody,  acts as RESTful service. This is included in package  org.springframework.web.    We use URI to name the resource. we can get the information contained in the URI.  {name}  gives the information where as  restExampleString  gives the path to the service.  sample URI for a RESTful service will be: http://localhost:8080/appname/restExampleString/ris @PathVarable : Here  ris  contains the information passed to the RESTful service.  @PathVariable  annotation is used to get the information on to method variable. This annotation can also have the parameter(binding URI variable name to method variable). @...

RESTful service with Spring3 annotations.

RESTful service with Spring3 annotations. Creating RESTful services @RequestMapping(value = {"restExampleString/{name}" }, method = RequestMethod.GET) public @ResponseBody String restExampleString(@PathVariable String name){ String returnText; returnText = "Welcome "+name+"."; return returnText; } A simple method annotated with  @ResponceBody,  acts as RESTful service. This is included in package  org.springframework.web.    We use URI to name the resource. we can get the information contained in the URI.  {name}  gives the information where as  restExampleString  gives the path to the service.  sample URI for a RESTful service will be: http://localhost:8080/appname/restExampleString/ris @PathVarable : Here  ris  contains the information passed to the RESTful service.  @PathVariable  annotation is used to get the information on to method variable. This ann...