Rest 1 « Web Service « Spring Q&A





1. Spring 3.0 REST implementation DispatcherServlet cannot find mapping    stackoverflow.com

I'm trying to get a simple REST service to work with Spring 3.0 but keep bumping into a blocking error: No mapping found for HTTP request with URI [/travel/us/nyc/sfo/20091010/1122/true/] in DispatcherServlet with ...

2. Spring 3.0M4 and passing objects as parameters to POST    stackoverflow.com

I'm quite sure this has to be in the docs somewhere, but I've looked for days and haven't spotted it. I'm probably staring myself blind when it's right in front of ...

3. How can I Convert XML to an Object using Spring 3.0 mvc while making RESTful request    stackoverflow.com

I'm using the Spring 3.0 RC1 framework and I'm currently testing out Spring mvc. I wanted to use Spring mvc to handle restful requests. I have set up my ...

4. Not repeating a path twice in Spring 3.0 MVC Restful mappings    stackoverflow.com

I'm mapping the url /modules/tips/SOME_ID/small to access the tip with id SOME_ID and to render it using the view small.jsp. The following code works great for this, however I am ...

5. Spring MVC 3.0 Rest problem    stackoverflow.com

I'm trying out Spring MVC 3.0 for the first time and like to make it RESTfull. This is my controller:

    @Controller
@RequestMapping(value = "/product")
@SessionAttributes("product")
public class ProductController {

    ...

6. Is the REST support in Spring 3's MVC Framework production quality yet?    stackoverflow.com

Since Spring 3 was released in December last year, I have been trying out the new REST features in the MVC framework for a small commercial project involving implementing a few ...

7. Mapping restful ajax requests to spring    stackoverflow.com

I have this piece of code:

@RequestMapping(value = "/test.json", method = RequestMethod.GET)
@ResponseStatus(HttpStatus.OK)
public @ResponseBody Object[] generateFile(@RequestParam String tipo) {
    Object[] variaveis = Variavel.getListVariavelByTipo(tipo);
    return variaveis;
}
As far as ...

8. Restful Path Parameters in Spring MVC 3    stackoverflow.com

Is it possible to: set a URI template in the mvc:view-controller element of the *-servlet.xml file or in a controller method and then use/get that path parameter in a jsp? I ...

9. Spring RestTemplate Behavior when handling responses with a status of NO_CONTENT    stackoverflow.com

Okay, I have a class NamedSystems, that has as its only field a Set of NamedSystem. I have a method to find NamedSystems by certain criteria. That's not really important. When ...





10. Stop URITemplate expansion when using Spring RESTTemplate    stackoverflow.com

I am using the Spring RestTemplate to make calls to a Apache Solr index. I form a request string manually and don't supply any intentional {variable_name} template expansion variables. Part of ...

11. Spring MVC @PathVariable getting truncated    stackoverflow.com

I have a controller that provides RESTful access to information:

@RequestMapping(method = RequestMethod.GET, value = Routes.BLAH_GET + "/{blahName}")
public ModelAndView getBlah(@PathVariable String blahName, HttpServletRequest request,
         ...

12. JIRA Rest Service with Bandana Manager    stackoverflow.com

I have a JIRA plugin that I'm developing that has a REST service. That service should be able to accept POSTed requests, unmarshall some data and store it. The seemingly suggested ...

13. javadoc-like tool for spring-mvc rest api documentation?    stackoverflow.com

I was looking for a javadoc-like REST API documentation tool. I already documented my rest controllers in javadoc and I think it would be nice to just create an api documentation ...

14. Where is Spring 3 MVC in REST web-app example download?    stackoverflow.com

I saw springsource.org had not spring 3 in rest web-app sample,where is download?

15. What´s the best protocol for connecting a java spring based backend with an java-based frontend (tapestry or someting else)?    stackoverflow.com

i´m about to do a project, where a Sring based backend should connect with a frontend which is java based too (tapestry or sometging - i don´t really know at this ...

16. problem in spring mvc REST services    stackoverflow.com

i want some thing like this in spring mvc, url/varible means like this. www.something.com/1 or /2 etc. what is the code in the controller class, and why we always implement the ...





17. Spring/Rest @PathVariable character encoding    stackoverflow.com

In the environment I'm using (Tomcat 6), percent sequences in path segments apparently are decoded using ISO-8859-1 when being mapped to a @PathVariable. I'd like that to be UTF-8. I already configured Tomcat ...

18. How to design a Spring MVC REST service?    stackoverflow.com

I want the client and server application to talk to each other using REST services. I have been trying to design this using Spring MVC. I am looking for something like ...

19. When/where is it ideal to determine Unsupported Media Type in Spring?    stackoverflow.com

So, I have a Spring MVC application, and I want a way to determine when a resource doesn't support a specific media type. I was thinking of doing this with ...

20. With SPRING 3.0, can I make an optional path variable    stackoverflow.com

With SPRING 3.0, can I make an optional path variable ? Like -

@RequestMapping(value="/json/{type}",method=RequestMethod.GET)
public @ResponseBody TestBean testAjax(HttpServletRequest req,@PathVariable String type,@RequestParam("track") String track) {
        return ...

21. Catch parameter parsing exception in Spring 3.0 WebMVC    stackoverflow.com

I use Spring WebMVC to provide a REST API. I use methods like @RequestMapping("/path({id}") void getById(@PathVariable("id") int id) {} methods. When the client incorrectly put a string instead of an integer id into ...

22. Spring3 MappingJacksonJsonView vs. MappingJacksonHttpMessageConverter    stackoverflow.com

Spring 3 includes the ContentnegotiatingViewResolver which can be used to decide on the views based on Aceept HTTP header for example. This would be one way to render a json view, ...

23. Spring @ExceptionHandler does not work with @ResponseBody    stackoverflow.com

I try to configure a spring exception handler for a rest controller that is able to render a map to both xml and json based on the incoming accept header. It ...

24. Spring MVC, RESTful Services & Apache Shiro Strategy    stackoverflow.com

I am busy working on a project that needs a REST API to allow users to access their information on a server. I have the system working using Spring MVC and ...

25. Deployment error on Glassfish V2.1 but not glassfish V3.0    stackoverflow.com

We are using Hibernate, Spring and RESTful web services in out project. Our WAR file deployment succeed on Glassfish V3 but when we try to deploy it on Glassfish V2.1, it ...

26. Pros & Cons on choosing APIs over MVC    stackoverflow.com

We need thoughts on the pros and cons for the below approaches.. We are in discussions for building a new platform for social networking on Java stack as the backend and html+jquery+php(little ...

27. Which is the best Java REST API?    stackoverflow.com

Even though it is a subjective question, I would like to know which one is the best Java REST API for web services? We are using Spring in our application, so if ...

28. Can we call RESTful webservices created using Spring REST support from .NETapplication?    stackoverflow.com

We have created RESTful web services using Spring's REST support. We need to call those web services from .NET aplication. Is it possible to do this i.e. calling web services written in ...

29. Smartgwt with RestDataSource and SpringController    stackoverflow.com

I have been stuck at this for a while. I have a smartgwt widget listgrid tied to a restdatasource. I have mapped its URLs to my spring services. However I cannot ...

30. Mapping REST endpoint and JSF2 view on same URI    stackoverflow.com

The goal is to combine a REST based web interface with JSF2 GUI interface in such a way so that the URI path' to correspondig resource representations remain the same, i.e.:

  • sample.com/samepath/resource_rep.html
    should ...

31. Spring REST offline testing    stackoverflow.com

I'm trying to test a spring web MVC controller. I have the following test class:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:controller-test.xml" })
public class EmployeesControllerMockTest implements ApplicationContextAware {


    // this servlet is going ...

32. Spring request body problem with non-valid xml    stackoverflow.com

In our rest application we use @RequestBody StreamSorce to upload xml file. The problem is that is xml itself is non-valid or contains some invalid characters, PUT request is failing(with http ...

33. Resolving the view - Spring REST service    stackoverflow.com

I want to generate raw xml from a REST service using Spring. Something is getting lost in resolving the views. I am getting the following:

javax.servlet.ServletException: Circular view path [RemedyXml]: would dispatch ...

34. Spring 3 & Rest: Exception thrown behind the scences    stackoverflow.com

I have a very simple Spring 3 ReST web service that looks like this

@RequestMapping(method = RequestMethod.POST, value = "/user")
public @ResponseBody
UserDTO saveUser(@RequestBody UserDTO userDTO)
{
    // Functionality removed as it ...

35. REST request with specific content type    stackoverflow.com

I'm successfully using Spring.net Rest on WP7 since this issue. My REST service requires a specific content type. I tried to used another request interceptor but XElementHttpMessageConverter overrides the content ...

36. Spring XML Binding    stackoverflow.com

I am attempting to create a RESTful service that takes incoming XML and parses the results into a business object. I have the XML and the business object. Is there ...

37. Best practice regarding REST services and I18N    stackoverflow.com

I have a client app that communicates with a server using REST services. The client app is multilingual which means the server must be aware of the user's locale during calls. ...

38. Content negotiation in Spring MVC    stackoverflow.com

I am writing a RESTful web application with Spring 3, and part of my application needs to process the data according to the requested media type.

@RequestMapping(...)
public String process() {
  if(requested_media_type_is_xml) ...

39. Designing a Scalable Application    stackoverflow.com

Starting a new project an e-commerce, that is basically consists of two main separated projects, a core application and a web client.

  1. Core app would act as a service provider, the ...

40. Spring MVC & Rest: different "layout" with same "content"?    stackoverflow.com

I have a Spring 3.0 web application which tries to follow the REST principles as long as it is pragmatic. I have a controller method to return a folder (this are my ...

41. Java RESTful file upload question    stackoverflow.com

I am learning now REST and Spring and I have to do some starting project, to get used with the technologies. So, I made a RESTful application after some tutorials and ...

42. RESTful web services framework comparison with Spring MVC REST support    stackoverflow.com

In one of our projects we are using the spring mvc. The spring mvc has inherent support for REST web services. I am looking forward to some insight/suggestions on how does ...

43. REST web services with Spring and Hibernate    stackoverflow.com

I have a requirement in which CRUD operations need to be exposed through REST web services with Spring and Hibernate. Presentation is through JSF. It would be of great help if ...

44. Spring REST - Post when Binary coming in    stackoverflow.com

I have been working mostly on get requests and generally use RestClient to test any web service. Usually perform a GET for object. Now I am attempting to do my first POST. ...

45. Spring - Attempting to test rest service with multipart file    stackoverflow.com

I am attempting to test a rest service I created. The service is a post.

  1. I wanted to create a file to pass the parameters(including a multi-part file).
  2. From there I am trying ...

46. Spring Rest 415 Unsupported Types Error    stackoverflow.com

We are in the process of changing all our web services from GET to POST. After the change to RequestMethod.Post I am getting 415 Unsupported Operations. The URL's to the service ...

47. Spring MVC, REST, and HATEOAS    stackoverflow.com

I'm struggling with the correct way to implement Spring MVC 3.x RESTful services with HATEOAS. Consider the following constraints:

  • I don't want my domain entities polluted with web/rest constructs.
  • I don't ...

48. How to inherit RequestMappings in a Spring 3 MVC REST API    stackoverflow.com

I'm trying to build a RESTful API using Spring MVC. I'm shooting for clean and manageable code where the package structure follows the url structure. So here is what I've got:

com.test.api.library
@RequestMapping("/library/{libraryId}")
public Library ...

49. Spring MVC Rest Issue    stackoverflow.com

So here is what i am trying to accomplish. I am writing a spring Rest WS using the latest spring annotation technology. This is the example i am trying to accomplish. ...

50. Java Framework for integrating WSDL, REST, etc    stackoverflow.com

At work, we currently have a WSDL interface as well as a semi-RESTful interface that we're looking to expand upon and take it to the next level. The main application runs using ...

51. Java Spring Configuration for REST-Server    stackoverflow.com

I've created a simple REST/Spring application with the following configuration:

<jaxrs:server id="RestServer" address="/">
  <jaxrs:serviceBeans>
    <ref bean="car" />
  </jaxrs:serviceBeans>
  <jaxrs:features>
    <cxf:logging />
  </jaxrs:features>
</jaxrs:server>

<bean ...

52. Enunciate with spring mvc rest and other Enunciate Questions    stackoverflow.com

Does any knows if Enunciate supports Spring MVC @RequestMapping rest annotations. If so does anyone have an enunciate.xml and pom.xml file for running the mvn plugin. The mvn plugin ...

53. How to create custom xml to object converter for spring rest template?    stackoverflow.com

I use spring rest template to send xml based post requests and receive xml based responses.

    HttpMessageConverter<?> stringHttpMessageConverternew = new StringHttpMessageConverter();
    List<HttpMessageConverter<?>> c = new ...

54. Spring Rest Services and Serialized java objects    stackoverflow.com

I have a Rest service that uses spring/jackson marshalling to marshall back the response in the form of xml or json. I was wondering is it possible to keep the same ...

55. WSO2 Identity server and spring 3 REST api integration    stackoverflow.com

I need to use WSO2 Identity server for OAuth token management. Is there an api available for operations like request token, validate a token and other relevant functions. I am ...

56. I need to implement Rest web service using spring 3 any help?    stackoverflow.com

I have a Library application which is already implemented in spring MVC I need to use ReST web services for the same application using spring 3 I have a Controller class I want ...

57. How to mock REST Services?    stackoverflow.com

I have a maven/mule/spring development environment that I build REST services within. I also have a series of TestNG tests to validate these services. I also want the ability ...

58. Simple REST service using Spring MVC, problems with configuration    stackoverflow.com

I'm trying to add a simple REST service to a default Spring MVC Template project created using the SpringSource Tool Suite (STS) and Eclipse. The REST service I want to expose ...

59. 2 Request Handlers for POST (ResponseBody + "Normal")    stackoverflow.com

I like to implement a REST-API into my SpringMVC application. At the moment, I have one method to handle POST-Requests, which "returns" a rendered ViewScript.

@RequestMapping(method=RequestMethod.POST)
public String onSubmit(User user, Model model)
{
  ...

60. Spring mvc with hibernate, how can I add a restful service endpoint?    stackoverflow.com

So I have spring mvc up and running with hibernate. I'm reading how I can add Restful endpoints using the @ResponseBody: http://blog.springsource.com/2010/01/25/ajax-simplifications-in-spring-3-0/ So if I have an endpoint like:

http://localhost:8080/services/user/get/1
I will fetch ...

61. Need to handle file input in a WS created in Spring-WS    stackoverflow.com

I'm trying to create a simple "send email" WS using Spring-WS which should be able to handle attachments. But I have failed to figure out how this could be implemented. I ...

62. Spring RestTemplate GET with parameters    stackoverflow.com

I have to make a REST call that includes custom headers and query parameters. I set my HttpEntity with just the headers (no Body) and I use the RestTemplate.exchange() method as ...

63. Spring RESTful client: root tag exception    stackoverflow.com

I'm trying to parse the result from a RESTFull call using RestTemplate following this sample http://thekspace.com/home/component/content/article/57-restful-clients-in-spring-3.html The XML Response is something like that:

<brands>
    <brand>
    ...

64. Automatic creation of model classes for spring Rest API    stackoverflow.com

I am about to use the spring Restful API for making some calls to external webservices with the usage of the RestTemplate class. I have already managed to perform the call, ...

65. 403 instead of login page redirect for REST WS    forum.springsource.org

Hi everybody, We have an ExtJS javascript application with a Tomcat/Spring/SpringSecurity backend exposing REST services. We have the standard SpringSecurity redirection to the login page when the user is not authenticated ...

66. Customize Spring Rest Template to handle custom status codes    forum.springsource.org

Hi, I have a requirement to handle custom status codes (Ex: 900) sent by a REST service. So far the spring provided RestTemplate cannot handle the custom status codes sent, which ...

67. Class not found when using Message Converters in REST    forum.springsource.org

Feb 4th, 2011, 09:51 AM #1 ganm View Profile View Forum Posts Private Message Junior Member Join Date Feb 2011 Posts 8 Class not found when using Message Converters in REST ...

68. Rest with spring mvc best practice    forum.springsource.org

Rest with spring mvc best practice Dear All Let's say I have 2 webapps to expose a business component, the first one is dedicated to presentation, views (let's say jsp) rendering ...

69. REST Service confusion    forum.springsource.org

Code: @RequestMapping(value = "/insertTestResults", method = RequestMethod.POST) @ResponseBody public PostReturn insertTestResults(@RequestParam("TestCaseId") String TestCaseId, @RequestParam("StartTime") String StartTime, @RequestParam("EndTime") String EndTime, @RequestParam("RunLength") String RunLength, @RequestParam("StatusId") String StatusId, @RequestParam("Status") String Status) throws ParserConfigurationException { ...

70. REST configuration problem    forum.springsource.org

Mar 9th, 2011, 01:21 PM #1 Jim_G View Profile View Forum Posts Private Message Junior Member Join Date Mar 2011 Posts 1 REST configuration problem Hi, This has been driving me ...

71. REST API Implementation with Spring or any other needed    forum.springsource.org

REST API Implementation with Spring or any other needed Hi, I am coming from JBoss, have used RESTEasy and liked it. Now we have a project that runs with Tomcat directly ...

72. REST post of a file that also returns a file result    forum.springsource.org

REST post of a file that also returns a file result Hi, I have a requirement to post a file from a client to a controller, which then immediately returns a ...

73. Spring WebMVC REST and Subresources    forum.springsource.org

The short answer is in Spring MVC the Resource and Sub-Resource relationship is not as formalized as it is in JAX-RS. If using one controller per resource as gendelisa mentioned, you ...

74. REST Help Needed! - Need an example of a "PUT" method    forum.springsource.org

REST Help Needed! - Need an example of a "PUT" method Found this example of a "PUT" method in Craig Walls book. Trouble is, I can't get the data binding to ...

75. Use one interface method and "hide" the rest    forum.springsource.org

Use one interface method and "hide" the rest Well, sometimes they say you that you have to use an EJB interface in your project for reusing some other's project code. Imagine ...

76. Possible character encoding/charset problem with Spring Rest    forum.springsource.org

Possible character encoding/charset problem with Spring Rest I can't find anyone else having an issue like this, so I'm not sure quite what's going on, but when retrieving some data using ...

77. Spring mvc+ REST    forum.springsource.org

Hi everybody i would like to develop REST services for the messenger application and i dont even have any idea to do i need ur help for the initiation ,i have ...

78. REST postForObject    forum.springsource.org

REST postForObject Is there a way to bind pojos to the input of a REST request. I'm trying to do something like the following : Code: @Override public AddBookResponse add(AddBook book) ...

79. Spring REST WS with WADL    forum.springsource.org

Hi, I have developed couple of REST web services using spring web API. I want them all to document so that our client can use those. Like WSDL in SOAP, I ...

80. Spring Integration + REST: is it possible?    forum.springsource.org

HI all i have written a spring integration server made up of channels and services. I am exposing serverside functionality via RMI to my swing client, and i was wondering if ...

81. QUestion on Spring MVC REST    forum.springsource.org

QUestion on Spring MVC REST I am working on spring rest WS. I have a controller with 2 methods. one which displays the JSP page with a textfield and the other ...

82. REST Web Service - HttpMessageConverter problem    forum.springsource.org

REST Web Service - HttpMessageConverter problem Hello, I am trying to make a web service using REST. When I run it locally without SSL, everything works fine. When I try to ...

83. REST Web Services Blob download    forum.springsource.org

84. REST won't POST or PUT to server    forum.springsource.org

REST won't POST or PUT to server So I'm fairly new to Spring. In the past couple of weeks I've pretty much read through Spring in Action 2, Spring in Action ...

85. Spring MVC, REST, and HATEOAS    forum.springsource.org

Spring MVC, REST, and HATEOAS This is cross posted from StackOverflow as I am not getting much of a response over there... I'm struggling with the correct way to implement Spring ...

87. Implementing Rest style web service using Spring MVC    forum.springsource.org

I have used Spring MVC for past few months. Spring MVC uses DispatcherServlet as FrontController and forwards request to other controllers as per the mapping provided in configuration file. If I ...

88. Rest based web service support in Spring.    forum.springsource.org

Rest based web service support in Spring. Hi all, I am new to SOAP and Rest based web services. In my current standalone application, the request and response payload of a ...

89. Implementing REST using Spring Web tier    forum.springsource.org

Implementing REST using Spring Web tier It seems fairly straight forward to implement a REST API using the web tier in Spring. I've implemented my own Controller and my own kind ...

90. REST using Spring-WS    forum.springsource.org

How would you go about changing the HTTP METHOD when using a org.springframework.ws.client.core.WebServiceTempl ate, and the sendSourceAndReceiveToResult() method? i.e. POST, GET, DELETE, PUT

91. REST, SOAP or POX?    forum.springsource.org

REST, SOAP or POX? I have a more or less standard web app, with a few heavy weight flash components. This components interact with the web app through a custom xml ...

92. REST, SOAP or POX?    forum.springsource.org

93. REST, SOAP or POX?    forum.springsource.org

94. REST webservices with Spring    forum.springsource.org

REST webservices with Spring Hi Folks, I am pretty new to using Spring. I am trying to know if there is any support for REST webservices with Spring. I have read ...

95. When will REST be supported?    forum.springsource.org

Are there any plans for REST to be supported in Spring Web Services? I have used Spring MVC to write many of our Spring Rest based webservices. All that would be ...

96. REST support    forum.springsource.org

I saw in another post that full REST support (via a RestTemplate, or similar) will most likely be addressed in spring-ws 2.0. Is there a timeframe for that release?

97. MDP that calls rest web service    forum.springsource.org

MDP that calls rest web service I am trying to develop an integration system that hooks together 2 third party systems, and on receiving a 'sync' message from app A I ...

98. rest in spring example    forum.springsource.org

hi guys, i m new to web services. i want to implement a restful web service using spring {returning NVPs}. It would great if you guys can suggest me any link ...

99. really a REST support in 3.0.0 M1?    forum.springsource.org

really a REST support in 3.0.0 M1? Hi folks, I am playing around with some tests on the REST support of 3.0.0 M1. All examples found on the web simply take ...

100. Rest support in 3.0    forum.springsource.org

Hi I'm testing rest support of 3.0. Adding another UrlHandlerMapping (for DWR integration in my case) make the restfull url support stop working (without any particular error at startup). How can ...