Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

General Architecture Diagram

Bus

The bus, being CXF's backbone, is a provider of shared resources to the CXF runtime. Examples for such shared resources include WSDL managers and binding factory managers. The bus can easily be extended to include your own custom resources or services, or you can replace default resources like the HTTP destination factory (based on Jetty) with your own (possibly based on another web container such as Apache Tomcat).

This extensibility is made possible by dependency injection: ; the default bus implemenation is based on Springhttp://www.springsource.com/developer/spring, which wires the runtime components together for you.

The SpringBusFactory searches for all bean configuration files in the META-INF/cxf directories on your classpath, and builds an application context from them. The bean configuration files included in the application context construction are:

  • META-INF/cxf/cxf.xml (e.g., in cxf-rt-core only)
  • META-INF/cxf/cxf-extension.xml (e.g. in cxf-rt-bindings-soap)
  • META-INF/cxf/cxf-property-editors.xml (e.g. in cxf-rt-transports-http)

See Configuration of the Bus for an example of how to customise customize the bus by supplying your own bean configuration file and Configuration of Runtime Constructed Objects for more information on the special case of injecting into objects created by the runtime (as opposed to objects created by the IOC container itself).

...

Front-ends provide a programming model to interact with CXF. The primary front-end at the moment is JAX-WS. The , JAX-WS RS, Simple and Javascript front-end APIs are provided by CXF . Each implementation is cleanly separated from the rest of CXF , just like the bindings and the core. They Front-ends provide functionality through interceptors that are added to Services and Endpoints. See also Front-ends.

JAX-WS Front-end

...

JAX-RS Front-end

...

Javascript Front-end

...

Simple Front-end

CXF includes a simple frontend which builds services from reflection. This is in contrast to the JAX-WS frontend which requires you to annotate your web service classes or create a WSDL first. The simple frontend will use reflection to intelligently map your classes to a WSDL model.

Javascript Front-end

...

Messaging & Interceptors

CXF is built on a generic messaging layer comprised of Messages, Interceptors, and InterceptorChains. Interceptors are the fundamental unit of functionality. By dividing up how messages are processed and sent, this gives CXF a very flexible architecture. It can be reconfigured at any point in the processing. This also gives CXF the ability to pause & resume interceptor chains.

...

The most common MessageObserver used in CXF is the ChainInitiationObserver. This takes the incoming message, creates a message Exchange & PhaseInterceptorChain, then starts the chain.

Tooling

...

Build Support

...

Endpoints

...

Putting it all Together

...