Menu Close
20.3. WS-Addressing の有効化
概要
WS-Addressing を有効にするには、WS-Addressing インターセプタをインバウンドおよびアウトバウンドインターセプタチェーンに追加する必要があります。これは、以下のいずれかの方法で行います。
- Apache CXF の機能
- RMAssertion および WS-Policy フレームワーク
- WS-Addressing 機能での Policy Assertion の使用
WS-Addressing の機能としての追加
WS-Addressing を有効にするには、それぞれ 例20.1「client.xml およびクライアント設定への WS-Addressing 機能の追加」および 例20.2「server.xml およびサーバー設定への WS-Addressing 機能の追加」に示すように、WS-Addressing 機能をクライアントおよびサーバー設定に追加します。
例20.1 client.xml およびクライアント設定への WS-Addressing 機能の追加
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:wsa="http://cxf.apache.org/ws/addressing" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/ws/addressing http://cxf.apache.org/schemas/ws-addr-conf.xsd"> <jaxws:client ...> <jaxws:features> <wsa:addressing/> </jaxws:features> </jaxws:client> </beans>
例20.2 server.xml およびサーバー設定への WS-Addressing 機能の追加
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:wsa="http://cxf.apache.org/ws/addressing" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <jaxws:endpoint ...> <jaxws:features> <wsa:addressing/> </jaxws:features> </jaxws:endpoint> </beans>