24.3.4.19. プロパティーの追加
@EndpointProperty annotation
@EndpointProperty アノテーションは、org.apache.cxf.annotations.EndpointProperty インターフェイスによって定義されます。SEI に配置されます。
このアノテーションは、Apache CXF 固有の設定をエンドポイントに追加します。エンドポイントのプロパティーは、Spring 設定ファイルで指定することもできます。たとえば、エンドポイントに WS-Security を設定するには、以下のように Spring 設定ファイルの jaxws:properties 要素を使用してエンドポイントプロパティーを追加できます。
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
... >
<jaxws:endpoint
id="MyService"
address="https://localhost:9001/MyService"
serviceName="interop:MyService"
endpointName="interop:MyServiceEndpoint"
implementor="com.foo.MyService">
<jaxws:properties>
<entry key="ws-security.callback-handler" value="interop.client.UTPasswordCallback"/>
<entry key="ws-security.signature.properties" value="etc/keystore.properties"/>
<entry key="ws-security.encryption.properties" value="etc/truststore.properties"/>
<entry key="ws-security.encryption.username" value="useReqSigCert"/>
</jaxws:properties>
</jaxws:endpoint>
</beans>
あるいは、「@EndpointProperty アノテーションを使用した WS-Security の設定」に示すように、@EndpointProperty アノテーションを SEI に追加して、Java で前述の設定を指定できます。