9.3.2. 設定の使用
概要
コンテナーへのデプロイ時など、XML を使用してサービスを公開する場合、エンドポイントの MTOM サポートをエンドポイントの設定ファイルで有効にすることができます。エンドポイントの設定に関する詳細は、パートIV「Web サービスエンドポイントの設定」 を参照してください。
手順
MTOM プロパティーは、エンドポイントの jaxws:endpoint 要素内に設定されます。MTOM を有効にするには、以下を実行します。
-
jaxws:property子要素をエンドポイントのjaxws:endpoint要素に追加します。 -
entry子要素をjaxws:property要素に追加します。 -
entry要素のkey属性をmtom-enabledに設定します。 -
entry要素のvalue属性をtrueに設定します。
例
例9.8「MTOM の有効化設定」 は、MTOM が有効なエンドポイントを示しています。
例9.8 MTOM の有効化設定
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schema/jaxws.xsd">
<jaxws:endpoint id="xRayStorage"
implementor="demo.spring.xRayStorImpl"
address="http://localhost/xRayStorage">
<jaxws:properties>
<entry key="mtom-enabled" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
</beans>