简体   繁体   中英

Web-Service: JAX-WS, CXF, WSDL… What's that all about?

Sorry fot his newbie question. But I really need a start on this one. I want to access a webservice in my Java EE project. This webservice offers a WSDL file. So I understand I can use this to build Java code from it to access the web service. Now I read that Apache CXF is a good framework that I can use. But what's the difference to JAX-WS?

Could someone please explain this to me?

JAX-WS is a Specification (provided by Sun Oracle) to defining Web Services by use of Annotations.

Apache CXF is a framework that implements JAX-WS to generate Web Services Definitions and Java Proxy (from a Web Service Definitions)

Apache Axis 2 is also a framework that now supports JAX-WS (up to JAX-WS 2). It's an improvement from Apache Axis. CXF supports up to JAX-WS 1.2.

Brief tutorial can be found here .

JAX-WS is an API (or specification) and CXF is an implementation of that API. There is also a reference implementation available here

CXF is good but you don't need it to solve your problem. You can use wsimport , which comes as part of the JDK, to generate classes from the WSDL to access the web service.

The other answers are correct, but with CXF or Metro you are getting an implementation web services stack and with that are extra features beyond the JAX-WS api. That is why JAX-WS RI also has more features available than just JAX-WS.

I think this article explains this very well in detail.

http://www.predic8.com/axis2-cxf-jax-ws-comparison.htm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM