Versions Compared

Key

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

...

Pluggable Data Bindings

Data Bindings bindings implement the mapping between XML elements and Java objects. Data bindings convert data to and from XML, produce XML schema, and provide support for wsdl2java code generation. Not all data bindings support all of this functionality. At very least, a data binding must provide the data conversion. See Data Binding Architecture for details. Currently supported databinding data bindings include JAXB 2.x (default), Aegis, Apache XMLBeans, Service Data Objects (SDO) and JiBX (under development).

...

Bindings provide ways to map concrete formats & and protocols on top of transports. A binding contains two main parts, a BindingFactory and a Binding. A BindingFactory builds a Binding from the service model's BindingInfo. The binding contains interceptors specific to the binding and also implements the createMessage() method, which creates a Message implementation specific for that binding. Currently supported protocol bindings include SOAP,

CXF currently supported the following bindings protocols: SOAP 1.1, SOAP 1.2, REST/HTTP, pure XML and CORBA.

...

The prototypical binding is SOAP. It has its own Message class called the SoapMessage. It adds the ability to hold the current SoapVersion and the headers for the message.

The Soap binding also adds a special type of interceptor called the SoapInterceptor. The SoapInterceptor adds two methods to the Interceptor class:

Code Block
java
java
Set<URI> getRoles();
Set<QName> getUnderstoodHeaders();

...

It has many interceptors designed to handle SOAP messages:

  1. StaxInInterceptor: Creates an XMLStreamReader from an incoming InputStream
  2. ReadHeadersInterceptor: Reads the headers into the SoapMessage
  3. MustUnderstandInterceptor: Checks the MustUnderstand attributes of all the headers against all the SoapInterceptor's getUnderstoodHeaders method.
  4. SoapOutInterceptor:

...

REST/HTTP Binding

...

...

Pure XML Binding

...

CORBA Binding

...

Transports

...