Im struck since many days as how to develop a REST based web service. Mostly all articles on net educates you to create service from popular IDEs like NetBeans, WSAD,etc. I want to develop a Hello Rest service that generates " XML response".
My problem is im not getting the start point of it. Since java code automatically gets created for web service. XML i dont know . So what should i write to create a service!
Also i read that service can be created in Net Beans from Entity Class.I created Entity class , but somehow its showing invalid entity class and hence fail to create service out of that. I know this is a very poor question but guyz please help me if anyone of you have created Rest Service before.
Originally posted by Kacee Saxena: I want to develop a Hello Rest service that generates "XML response".
Well REST looks at it a bit differently (even though there are examples that do exactly what you are asking for). RESTful web services isn't something that can be learned from looking at code and APIs - there are other concepts at work that you should understand first. RESTful Web Services is currently the best material for these concepts and there is precious little Java code in there.
However you may want to look at the Restlet site for some more hands on material. Download the framework, try the samples and have a look at some of the other links.
Mostly all articles on net educates you to create service from popular IDEs like NetBeans, WSAD,etc.
So far I have found that most IDEs are obstacles to understanding web services. They are fine once you know what is going on - however before that they shield you from the kind of detail that would help you to understand what is going on.
XML i dont know.
Actually REST is de-emphasizing the importance of XML. The content-type of the "representation of state" can be any valid media-type, plain text, XML, JSON, etc. However you should be comfortable working with the media-types that you choose to use.
I agree that the RESTful Web Services book is a great resource. The authors are very good at pointing out where people trying to sound RESTful are going astray and getting all tangled up in trying to make RPC style services look RESTful.
I just spent some time playing with NetBeans 6.0 which has a plugin for using the current JSR 311 (Jersey) implementation. It all seems unnecessisarily complicated to me.