Download presentation
Presentation is loading. Please wait.
Published byBerenice Goldsmith Modified over 10 years ago
1
Francisco Gonzalez Mario Rincon
2
Apache CXF is an open source services framework. CXF helps you build and develop services using frontend programming APIs, like JAX-WS and JAX-RS. These services can speak a variety of protocols such as SOAP, XML/HTTP, RESTful HTTP, or CORBA and work over a variety of transports such as HTTP, JMS or JBI.
3
JAX-WS Support Spring Integration Aegis Databinding RESTful services WS-* Support Apache Licensed
4
CXF support three major types of services: SOAP REST-ful CORBA
5
Programming model for application interactions with CXF Three main variations: JAX-RS (configured with annotations and/or XML) JAX-WS (configured with annotations and optionally XML) Simple (limited compared to JAX-WS, but no annotations required)
6
HTTP Transport: There is a Servlet transport for those who are deploying into a Servlet container. There is also a standalone HTTP server based on Jetty. JMS: CXF's JMS transport plug-in uses the Java Naming and Directory Interface (JNDI) to locate and obtain references to the JMS provider that brokers for the JMS destinations. Local Transport
7
CXF includes a "local" transport. This transport allows you to send messages more efficiently inside a JVM. The messages will serialized and piped from one endpoint to another. The local transport supports URIs of the structure "local://{endpoint_name}" To use the local transport you simply need to set your address to a local URI.
8
CXF uses JAXB 2.x as its default databinding. XMLBeans. Aegis data binding will turn nearly any Java object into something that can be represented using schema, including Maps, Lists, and unannotated java types. SourceDataBinding for Source objects.
9
There are different ways to build RESTful services with CXF. JAX-RS: CXF has an implementation of JAX-RS. This provides a more standard way to build RESTful services in JAVA. JAX-WS Provider and Dispatch: It is possible to create RESTful services with the JAX-WS Provider and Dispatch APIs. HTTP Binding: The HTTP binding provides a flexible way of creating resources and mapping them to operations in your service. Note : HTTP Binding has been deprecated and is likely to be removed from CXF in one of its future releases.
10
JAX-WS includes many more annotations such as: @WebMethod - customize the operation name, exclude the operation from inclusion in the service, etc @WebParam - customize a parameter's name, namespace, direction, etc @WebResult - customize the return value of the web service call
11
If you have existing WSDLs for your service or wish to write your WSDL first and then generate classes, CXF has many tools to help you do this. The WSDL2Java tool will generate a JAX-WS annotated service and server stub from your WSDL. You can run it one of three ways: - The command line - The Maven Plugin - With the WSDL2Java API
12
Sometimes you don't want to annotate classes or use the JAX-WS APIs. CXF includes a Simple Frontend which allows you to take nearly any class and make a service out of it with absolutely no extra work.
13
The JAX-WS frontend is far more flexible than the Simple frontend. There are only two reasons to select Simple over JAX-WS: You must avoid the use of Java annotations. JAX-WS requires them, Simple does not. You want to have the absolutely smallest possible collection of additional dependencies. JAX-WS has more dependencies than Simple.
14
WS-Addressing adds message identification and routing information WS-Policy adds XML encryption and signing WS-ReliableMessaging adds message acknowledgement and retransmission WS-SecureConversation enterprise authentication and ongoing exchanges WS-Security WS-SecurityPolicy to configure WS-Trust enterprise authentication and ongoing exchanges
15
Very flexible Java web services stack Most complete REST support SOAP WS-* support close to the best Different configuration options adapt to widest range of application scenarios OSGi support adding even more flexibility Also the best supported Great approach for building web services
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.