By Naresh on Feb 19, 2009
18th Feb 2009 will be one of the most memorable days in my life. It was the Day for which we have been eagerly waiting. It was the first day of Sun Tech Days@Hyderabad - 2009.
We had a session on REST scheduled late in the evening. Sudhir and myself reached the venue, Hyderabad International Convention Centre, better known as Novotel or Hitex, by 9:00 in the morning. The day began with keynote from James Gosling on hot technologies including RESTful Web Services. Then there were a couple of interesting sessions by Arun Gupta on Metro and GlassFish. And then at 6:00 in the evening, the session on REST, titled Connecting the World with REST, began.
Since this was the last session of the day, I was little bit worried, that not many delegates might turn around for the session, but there were a good number of them (somewhere around 600), who were there in the hall waiting for the session. This indeed showed REST is getting popular and that lot of people want to know about it.
Everything was setup and we got started. The session began with an introduction to REST, RESTful web services and how JAX-RS / Jersey are related to them, followed by a small demo illustrating how to create simple RESTful web services using Jersey and NetBeans. In the demo, we showed how to read path parameters and query paramters using the JAX-RS annotations @PathParam and @QueryParam. Also, we showed how to represent data in multiple representations like XML, JSON, plain-text, etc. We wanted to show how to use the Jersey Client API too, but could not show that because of time constraint.
Then it was the Q&A time. There were a lot of people who have worked / are working on SOAP web services, and hence there were a lot of questions. Few of them that I can recall of are:
- I have a SOAP web service. I want to convert it to a REST service. Is there a tool which does that? There were many questions related to this.
- How do I pass JSON data to my service?
- How is a REST service different from CORBA?
- How does Jersey produce data in XML / JSON representations from a JAXB annotated object?
- When should I go for REST and when should I go for SOAP?
- Is there a support for Security, Reliable-Messaging, etc?
- About the WADL file?
- If any tool were required for generating clients, as in SOAP?
- Would it be possible to consume a SOAP web service using Jersey Client API?
Also, there were many people who wanted to get started with Jersey, and wanted to know if there were some good references. I have pointed them to blogs, the Jersey project page and the main wiki page.