Announcement Announcement Module
Collapse
No announcement yet.
Spring3 Restful webservices Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring3 Restful webservices

    I'm new to Spring3 webservices. i was asked to create restful webservices..

    as part of i was aked to create service and domain objects.

    So i was going through lot many examples..I see everywhere they are making controller as Webservice....

    But in real time is controller or service class going to be exposed as webservice class?

    If controller has to be exposed as a webservice then other .net or j2ee projects how they can send calls to this Controller...since contrloller is specific to MVC...

    here is the example I'm following.
    http://www.ibm.com/developerworks/we...erv/index.html


    Thanks
    TPReddy.

  • #2
    Any suggestions around?

    Comment


    • #3
      If controller has to be exposed as a webservice then other .net or j2ee projects how they can send calls to this Controller...since contrloller is specific to MVC...
      Other projects can call the Spring Controller via the url. Remember you map your Controllers with specific URLs.

      For example:

      Code:
      @RequestMapping(value="\myurl\myitem", method=RequestMethod.GET)
      public String MyController(Model model) {
      ...
      }
      If your project is located at the domain http://www.mydomain.org the the full url would be http://www.mydomain.org/myurl/myitem.

      That's the URL you will use to call this controller from a NET or any other project. Of course you will have to send the correct HTTP method (i.e GET, PUT, DELETE, POST).

      Comment

      Working...
      X