views:

75

answers:

3
+2  Q: 

java webservices

Hi

We have a current jee project and a new requirement to introduce a webservice into the project. We develop on Rad 7 and deploy to Websphere 6.1, but this could change soon to deploy to tomcat.

What i was wondering is, what approach should we take for developing these webservices? Should we develop RESTful webservices and use JAXB? Should we use the web service generation tool in Rad 7 (this would tie us to websphere) Should we use the approach of generating our xml schema, generate wsdl file and then generate code from wsdl?

We are not interested in using Axis.

What would be the best approach, or what would people regard as the latest and greatest way of creating webservices in Java?

Thanks Damien

+1  A: 

Have you considered JAX-RS (JSR311) and/or its Sun reference implementation Jersey? Note that the R in JAX-RS stands for RESTful.

You can find more info/docs/blogs/tutorials about Jersey at sun.com here.

BalusC
Interesting. I knew about JAX-WS but not JAX-RS...
R. Bemrose
Yes same as. I just did a quick search and I see that JAX-WS supports RestFul services. If you had the choice Balus, which would you use?
Damo
Useful link: http://www.rekk.de/bloggy/2008/java-webservices-relationship-of-jax-ws-jax-rs-metro-and-jersey/
Damo
JAX-RS is relatively new. As it is more designed towards RESTful, I would prefer that if I want a RESTful webservice.
BalusC
+2  A: 

Going with JAX-WS/JAXB is a good idea. JAXB is part of the JDK now (in 1.6) so it's not going anywhere. JAX-WS is easily deployed with your web applications in Tomcat as well.

We've used Axis here in the past and we've had some difficulty with deploying those clients and services (we eventually got it worked out, but the documentation did not help nor did anything else we found on the internet).

Andy Gherna
A: 

You might want to consider using Spring WS for SOAP services or using Spring MVC for RESTful. Here's a related blog entry to using Spring MVC with REST.

beny23