Loading ...
Sorry, an error occurred while loading the content.
 

Rest - Soap - Restlet questions

Expand Messages
  • skkcr
    Hi, Please bear with my long email as SOAP, Rest and Restlet are new to me. I am working on a SOA based web services project where different services talk to
    Message 1 of 3 , Apr 28, 2007
      Hi,

      Please bear with my long email as SOAP, Rest and Restlet are new to
      me.

      I am working on a SOA based web services project where different
      services talk to each other. My current web service encapsulates an
      application that is wired with Spring.

      In my web service usage, the intent is to pass around the query and
      response in the form of xml along with other string query parameters.

      Currently my web service is exposed through Soap.
      I recently came across that one of Soap limitations is that the data
      element size in the xml document is 32K (I am not sure if it is true
      yet, I appreciate your input here).
      To avoid this restriction, I started exploring Rest.
      It looks like Rest is an architectural style and has the following
      main advantages over SOAP:
      - it does not need development tools
      -the url of the resources can be internally mapped to the changed
      service's api.
      -usage of http get
      -usage of nouns in uri and there is no need for ? in the uri.

      But I intent to expose my web service both thru SOAP and Rest.

      Currently my SOAP based web service is running in a web container
      and I want to add Rest version of the web service.

      What I am not clear is how to implement Rest and i have the
      following questions:

      1) does Rest based web sevice invlove simplying exposing an xml
      document that has the uris for different resources to the web
      service clients and return the queried data in xml form?

      2) I do not see the need for the mvc pattern to be implemented here
      as my service is not a true web application.

      3) I do not see the need to use Restlet Frame Work since my intent
      is to use the web container ONLY to support Soap based web service.
      Also I do not want to embed the overhead of routers and resources
      and servletconvertor.

      Please advise.

      Also an example code of the Rest based web service is appreciated.

      Thanks in advance for your valuable input, time and interest.
    • Nic James Ferrier
      ... Yes. If you did that you would have a usable, RESTfull service. There is debate here about what that XML should be. But any XML is acceptable. The BEST XML
      Message 2 of 3 , Apr 29, 2007
        "skkcr" <skkcr@...> writes:

        > 1) does Rest based web sevice invlove simplying exposing an xml
        > document that has the uris for different resources to the web
        > service clients and return the queried data in xml form?

        Yes. If you did that you would have a usable, RESTfull service.

        There is debate here about what that XML should be. But any XML is
        acceptable. The BEST XML is a matter of some debate.


        > 2) I do not see the need for the mvc pattern to be implemented here
        > as my service is not a true web application.

        Seems fair.

        MVC is *just* a programming pattern. You don't need to use it.


        > 3) I do not see the need to use Restlet Frame Work since my intent
        > is to use the web container ONLY to support Soap based web service.
        > Also I do not want to embed the overhead of routers and resources
        > and servletconvertor.

        That's fine. You don't need to use Restlet to make a REST service. I
        have *never* used Restlet's and I've been designing REST based
        services since 2002.


        > Also an example code of the Rest based web service is appreciated.

        Have a poke around on the REST wiki... there are good examples of
        basic REST technologies.

        --
        Nic Ferrier
        http://www.tapsellferrier.co.uk
      • Elliotte Harold
        ... XML has nothing to do with REST and vice versa. REST merely describes how you exchange documents (excuse me, representations). It says nothing about the
        Message 3 of 3 , Apr 30, 2007
          Nic James Ferrier wrote:
          > "skkcr" <skkcr@...> writes:
          >
          >> 1) does Rest based web sevice invlove simplying exposing an xml
          >> document that has the uris for different resources to the web
          >> service clients and return the queried data in xml form?
          >
          > Yes. If you did that you would have a usable, RESTfull service.
          >
          > There is debate here about what that XML should be. But any XML is
          > acceptable. The BEST XML is a matter of some debate.
          >

          XML has nothing to do with REST and vice versa. REST merely describes
          how you exchange documents (excuse me, representations). It says nothing
          about the format of these documents.

          There are many useful REST services that do not use XML, and many useful
          XML services that do not use REST.

          That said, it is often a good idea to use XML to exchange
          representations, but don't get fooled into thinking you have to.

          --
          Elliotte Rusty Harold elharo@...
          Java I/O 2nd Edition Just Published!
          http://www.cafeaulait.org/books/javaio2/
          http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/
        Your message has been successfully submitted and would be delivered to recipients shortly.