...
WS-Addressing
...
Configuration
...
In
...
order
...
to
...
use
...
WS-Addressing
...
in
...
a
...
message
...
exchange,
...
two
...
things
...
are
...
necessary:
...
- The
...
- addressing
...
- interceptors
...
- (org.apache.cxf.ws.addressing.MAPAggregator
...
- and
...
- org.apache.cxf.ws.addressing.soap.MAPCodec)
...
- need
...
- to
...
- be
...
- on
...
- the
...
- nbound
...
- and
...
- outbound
...
- interceptor
...
- chains,
...
- and
...
- The
...
- use
...
- of
...
- WS-Addressing
...
- is
...
- indicated
...
- by
...
- one
...
- of
...
- the
...
- following:
...
- A <UsingAddressing xmlns="http://www.w3.org/2005/02/addressing/wsdl
...
- "> element is attached to the wsdl:port,
...
- wsdl:service
...
- or
...
- wsdl:binding
...
- element.
...
- The
...
- (chosen
...
- alternative
...
- for
...
- the)
...
- effective
...
- policy
...
- of
...
- the
...
- message
...
- contains
...
- a <Addressing xmlns="http://www.w3.org/2007/02/addressing/metadata
...
- "> assertion
...
- or
...
- a
...
- UsingAddressing
...
- assertion
...
- from
...
- either
...
- one
...
- of
...
- the
...
- following
...
- three
...
- namespaces:
...
...
...
...
- Property
...
- org.apache.cxf.ws.addressing.using
...
- in
...
- the
...
- message
...
- context
...
- is
...
- set
...
- to
...
- Boolean.TRUE.
...
Note
...
that
...
for
...
2.2
...
to
...
take
...
effect,
...
CXF's
...
policy
...
engine
...
must
...
be
...
enabled,
...
see
...
...
...
Adding the Addressing Interceptors using the Addressing Feature
For an individual endpoint:
Code Block | ||||
---|---|---|---|---|
| ||||
|WSPConfiguration]. h2. Adding the Addressing Interceptors using the Addressing Feature For an individual endpoint: {code:xml} <beans ... xmlns:wsa="http://cxf.apache.org/ws/addressing" ...> <jaxws:endpoint ...> <jaxws:features> <wsa:addressing/> </jaxws:features> </bean> </beans> {code} h2. Adding the Addressing Interceptors Manually |
Adding the Addressing Interceptors Manually
org.apache.cxf.ws.addressing.MAPAggregator
...
and
...
org.apache.cxf.ws.addressing.soap.MAPCodec
...
must
...
be
...
added
...
to
...
the
...
interceptor
...
chain
...
for
...
inbound
...
and
...
outbound
...
messages
...
and
...
faults.
...
On
...
a
...
global
...
level,
...
i.e.
...
applicable
...
to
...
all
...
client
...
and
...
server
...
endpoints,
...
this
...
can
...
be
...
done
...
as
...
follows
...
(see
...
also
...
...
...
):
...
Code Block | ||||
---|---|---|---|---|
| ||||
<bean id="mapAggregator"
...
class="org.apache.cxf.ws.addressing.MAPAggregator"/>
...
<bean
...
id="mapCodec"
...
class="org.apache.cxf.ws.addressing.soap.MAPCodec"/>
...
<cxf:bus>
...
<cxf:inInterceptors>
...
<ref bean="mapAggregator"/>
...
<ref bean="mapCodec"/>
...
</cxf:inInterceptors>
...
<cxf:inFaultInterceptors>
...
<ref bean="mapAggregator"/>
...
<ref bean="mapCodec"/>
...
</cxf:inFaultInterceptors>
...
<cxf:outInterceptors>
...
<ref bean="mapAggregator"/>
...
<ref bean="mapCodec"/>
...
</cxf:outInterceptors>
...
<cxf:outFaultInterceptors>
...
<ref bean="mapAggregator"/>
...
<ref bean="mapCodec"/>
...
</cxf:outFaultInterceptors>
...
</cxf:bus>
...
Configuring
...
the
...
Addressing
...
Interceptors
...
TBD
...