Which Java Web Service Framework do you prefer? - java

I am gonna implement web service in Java but before implementation I will decide which framework I should use. Simplicity and running on JBoss 4.2.3 Platform are the requirements.
What is your suggestions?

Instead of using an additional technology stack component, why not use the #WebService annotation introduced in EJB3. JBoss 4.2.3 supports EJB3
Two examples
Using EJB3 Web Services guarantees that you web services will run on any Java EE compliant server without any modifications to the server.

Since JBoss provides JavaEE features, you can simply take a look at JAX-WS, annotate your EJBs, and let JBoss handle everything from there.
Otherwise you can look at Apache CXF and for JBoss + CXF see here

Axis2 on Tomcat 6
JAX-WS on Tomcat 6
Quick, Fast and Easy

Related

Difference between Application servers and standalone frameworks

I would like you guys to give me some feedback, on my understanding about the
difference between Application Servers such as JBoss and frameworks such as Axis and CXF.
CXF is a standalone, web-app based framework that
implements JAX-RS, JAX-WS API wich, in turn, are part of the
larger API set of JEE.
Being a web-app based implementation, it
can only be used to host "SOAP on HTTP" services even if the
standard JAX-WS defines other possible channels for SOAP
messages,such as SMTP.
Application servers,such as JBOSS, instead implement JAX-WS as well as all the other JEE APIs in a more "native" and direct way, so,for example, they can be used to host also SOAP on SMTP services.
Both AS and standalone frameworks such as CXF and AXIS make
extensive use of Inversion of control.
Application Servers, such as Jboss, can be thought as composed by a
set of frameworks that implement all the JEE stack API.
Please take some time to correct/enhance the above statements.
Thanks

Which the versions of Tomcat and JBoss servers support CDI integration?

1) I want to know which versions of the Tomcat and JBoss servers support the CDI because I need to do a migration of applications that run on Tomcat 5
2) Where the integrations is better, in Tomcat or JBoss?
P.S: the application in question isn't distributed, has Struts, JSP, Servlet, DWR and JDBC.
Tomcat doesn't support CDI out of the box. You will need to configure it manually. If you are looking for server that provides it and is lightweight, you may check also WebSphere Liberty, which is modularized and allows you easily select what you need from Java EE stack, without fighting with 3rd party libraries.
1) CDI is supported only from Tomcat 6, however according to JBoss documentation the current supported versions for Weld (CDI reference implementation) are just 7 and 8.
2) Integration would be easier with JBoss EAP (support from EAP 5) or Wildfly, however if you don't need any Java EE technologies I would go with more lightweight server like Tomcat or Jetty. Only downside is that you have to do some tweaks in your application in order to use CDI under Tomcat or Jetty. Nice article about configuring CDI in Tomcat is this one

bottom up service generation tool

Normally I go for top-bottom service creation(e.g. write wsdl, then generate a service based on it)
now I need to generate a service in a bottom-up - what would be the best tool for it?
I have an old guide which describes generation of ws using Sun Java Studio Enterprise - it does not exist anymore as I may see... so what is the substitution?
I use Apache CXF for creating and using web services. It's really easy to use and I have never had any big problems with it.
You can use Java API for XML Web Services (JAX-WS) for create Web Services. JAX-WS uses annotations to simplify the development and deployment of web service clients and endpoints. JAX-WS can be used in Java SE starting with version 6.
There is several JAX-WS implementations:
Apache Axis2/Java
Apache CXF
Metro
You can follow the JAX-WS Five Minute Tutorial of Mohammad Juma. And, why not, Deploy JAX-WS Web Services On Tomcat.
For NetBeans and Glassfish, you can see Getting Started with JAX-WS Web Services. On eclipse, you can see Step by Step tutorial to create a JAX-WS with Eclipse, CXF and Glassfish V3.

which server-software is recommended to run java-based webservices

i was wondering which server-software (tomcat, ...) is recommended to run a webservice written in java. are there actually any alternatives to tomcat?
thanks!
Each JavaEE server (Glassfish, JBoss, etc) supports web-services. In fact, Tomcat does not provide out-of-the-box support for them.
I, personally, would go for Tomcat + a JAX-WS provider like CXF.
We generally work with Tomcat and JBoss, using Axis for the web service implementation. Works for us.

Spring 3.0 JAX-WS and or vs. Apache CXF

Spring 3.0.1 has solid JAX-WS web services support. At the same time, I see that many articles refer to Apache CXF as a great web services framework.
If I work in the Spring/Hibernate world and want to expose the high-performing web services to the front end, should I consider utilizing Apache CXF? Is there any advantage to adding this additional framework to the mix?
The two are not mutually exclusive. Apache CXF is fully JAX-WS compliant.
Remember, JAX-WS is just a specification. Spring talks ato that spec'd API, and doesn't much care which implementation you use. Java6 ships with an internal JAX-WS implementation (Metro, or part of it), and CXF is merely an alternative implementation.
CXF is probably a bit more capable than the JAX-WS that ships with Java6, but unless there's something specific that you need that Java6 doesn't provide, I'm not sure it's worth the bother.
As for Spring and JAX-WS, Spring just makes it a little bit easier to use.

Categories