1 / 15

Apache CXF

Apache CXF. Francisco Gonzalez Mario Rincon. CXF. 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.

palila
Download Presentation

Apache CXF

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Apache CXF Francisco Gonzalez Mario Rincon

  2. CXF • 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. Why CXF? • JAX-WS Support • Spring Integration • Aegis Databinding • RESTful services • WS-* Support • Apache Licensed

  4. Services CXF support three major types of services: • SOAP • REST-ful • CORBA

  5. Front-ends 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. Transport • 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. Transport • 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. Data Bindings • 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. RESTful Services 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 Annotated Services from Java 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. JAX-WS Annotated Services from WSDL • 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. Simple Frontend • 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. Most Applications Should Use JAX-WS 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-* Support • WS-Addressingadds message identification and routing information • WS-Policyadds XML encryption and signing • WS-ReliableMessagingadds message acknowledgement and retransmission • WS-SecureConversation enterprise authentication and ongoing exchanges • WS-Security • WS-SecurityPolicyto configure • WS-Trust enterprise authentication and ongoing exchanges

  15. CXF Summary • 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 • OSGisupport adding even more flexibility • Also the best supported • Great approach for building web services

More Related