i'm just new to webservices (thanks to ivan for your study notes !!!) and have a question regarding application architecture.
e.g. an architect wants to build a resource-oriented application based on RESTful webservices (http-binding). he talks about this
approach with a collegue (which is new to jax-ws) and after some time his collegue states the opinion that its better to do the
job using a plain old servlet framework like struts, turbine or spring.
what is your opinion about this ? which are the strong advantages of the RS approach ?
thanks in advance for your answers.
Professional Senior Crap Manager & doing Livestrong
Yes, but that's a kludge. Using a SOAP framework for REST WS is not the best way to go about things.
You lose all the clarity of RESTful style by trying to jam it into a SOAP framework. JAX-WS is too tightly tied to JAXB and XML in general. Remember that a RESTful approach can serve any (repeat any) resource with equal facility.
I am going to repeat myself a little too.
Of course you can use servlets etc to build services, but the interesting question is (in my opinion) what the consequences will be.
As before, REST is an architectural style which aim is to obtain certain goals as described in the Wikipedia article: http://en.wikipedia.org/wiki/Representational_State_Transfer In order to obtain those goals, you have to follow certain principles (also described in the Wikipedia article).
It is possible to follow those principles when developing servlet-based services. I can also develop Object-Oriented software using assembly language - the question is if it is a convenient and time-efficient approach.
Also, my experience is that the more clear patterns, for instance for developing a service, there are, the more likely it is that the result created by different developers is more similar. One of the risks is that there is no clear pattern how to develop a service using servlets. Using JAX-RS annotations, it becomes, in my opinion, much more clear.