...
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 | ||||
---|---|---|---|---|
| ||||
Set<URI> getRoles(); Set<QName> getUnderstoodHeaders(); |
...
It has many interceptors designed to handle SOAP messages:
StaxInInterceptor
: Creates anXMLStreamReader
from an incomingInputStream
ReadHeadersInterceptor
: Reads the headers into theSoapMessage
MustUnderstandInterceptor
: Checks theMustUnderstand
attributes of all the headers against all theSoapInterceptor
'sgetUnderstoodHeaders
method.SoapOutInterceptor
:
...
REST/HTTP Binding
...
...
Pure XML Binding
...
CORBA Binding
...
Transports
...