Consume REST web services in java using rapa

Discussions

News: Consume REST web services in java using rapa

  1. Consume REST web services in java using rapa (7 messages)

    I have been reading about REST webservices for quite a while now. But rails still seems to have the best support for consuming REST webservices (ActiveResource). It is magical the way active resource works. Even if the magical and dynamic behavior may not be completely possible in java, it would be helpful if we have basic support for accessing REST webservices. A few options which immediately pop up on a search would be restlet, apache cxf and jersey (reference implementation of jsr 311). But they are not as easy to use as ActiveResource and not very object oriented. The motivation behind rapa is to fill this gap. In this blog I will take you through creating a simple REST webservice with rails and then use rapa to consume it in an object oriented approach. Rapa uses the tried and tested Jakarta Commons HttpClient and JAXB. It helps you in consuming REST webservice easily by taking care of the grunt work (making connection to the webservice, transporting data etc). All that said, its time for some code. Read the rest at http://harikrishnan83.wordpress.com/2009/01/24/consume-rest-webservices-in-java-using-rapa/ .

    Threaded Messages (7)

  2. Jersey and RESTEasy alternatives[ Go to top ]

    What does this do that the Jersey client and the RESTEasy client do not?
  3. What does this do that the Jersey client and the RESTEasy client do not?
    You can use Spring web services and then not worry about what you use behind the scenes - axis, rest, jax-rpc etc.
  4. Though currently it is not as easy as active resource, the intent is to make it that way. We are working towards that and looking for suggestions. Another key consideration is to keep it as simple and as light weight as possible. Thanks for your comment. I used jersey client myself and find it very useful too. Please do send us your suggestions, and I am sure it will help us a lot.
  5. dependent on Rails[ Go to top ]

    Seems to be dependent on Rails and how they format requests.
  6. It is not dependant on rails[ Go to top ]

    Thanks for the comment. I have used rails webservice as an example because it is easy to build. I am working on a new example using jersey to create the REST webservice and consume it with rapa.
  7. Re: It is not dependant on rails[ Go to top ]

    Thanks for the comment. I have used rails webservice as an example because it is easy to build. I am working on a new example using jersey to create the REST webservice and consume it with rapa.
    So, do you have to define a specific XML/JSON message format to enable this to work? That may be the more interesting part here...
  8. Very good point[ Go to top ]

    As of now it supports only XML based REST services. We are working on adding JSON support in the next release. Thank you so much for the suggestion.