Show Table of Contents
4.3. Apache CXF 設定
BPEL は JAX-WS API を使用して JBossWS と統合します。これにより、BPEL が JBossWS ネーティブと Apache CXF Web サービススタックの両方をサポートできるようになります。本章は、BPEL プロセスに追加の設定情報を含める方法、特に Apache CXF Web サービススタック関連について説明します。
4.3.1. サーバーのエンドポイントの設定
サーバーが利用できるように CXF 設定を作成するには、BPEL デプロイメントの root ディレクトリに
jbossws-cxf.xml と呼ばれるファイル (配備記述子と合わせて) を設置してください。
JAX-WS アノテーションベースの Web サービスをデプロイする場合は、jbossws-cxf で使用するファイルと同じです。このファイルの内容の例を以下に示しています。
<beans
xmlns='http://www.springframework.org/schema/beans'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:beans='http://www.springframework.org/schema/beans'
xmlns:jaxws='http://cxf.apache.org/jaxws'
xsi:schemaLocation='http://cxf.apache.org/core
http://cxf.apache.org/schemas/core.xsd
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/schemas/jaxws.xsd'>
<bean id="UsernameTokenSign_Request"
class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
<constructor-arg>
<map>
<entry key="action" value="UsernameToken Timestamp Signature"/>
<entry key="passwordType" value="PasswordDigest"/>
<entry key="user" value="serverx509v1"/>
<entry key="passwordCallbackClass"
value="org.jboss.test.ws.jaxws.samples.wsse.ServerUsernamePasswordCallback"/>
<entry key="signaturePropFile" value="etc/Server_SignVerf.properties"/>
<entry key="signatureKeyIdentifier" value="DirectReference"/>
</map>
</constructor-arg>
</bean>
<bean id="UsernameTokenSign_Response"
class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
<constructor-arg>
<map>
<entry key="action" value="UsernameToken Timestamp Signature"/>
<entry key="passwordType" value="PasswordText"/>
<entry key="user" value="serverx509v1"/>
<entry key="passwordCallbackClass"
value="org.jboss.test.ws.jaxws.samples.wsse.ServerUsernamePasswordCallback"/>
<entry key="signaturePropFile" value="etc/Server_Decrypt.properties"/>
<entry key="signatureKeyIdentifier" value="DirectReference"/>
<entry key="signatureParts"
value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body"/>
</map>
</constructor-arg>
</bean>
<jaxws:endpoint
id='SecureHelloWorldWS'
address='http://@jboss.bind.address@:8080/Quickstart_bpel_secure_serviceWS'
implementor='@provider@'>
<jaxws:inInterceptors>
<ref bean="UsernameTokenSign_Request"/>
<bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
</jaxws:inInterceptors>
<jaxws:outInterceptors>
<ref bean="UsernameTokenSign_Response"/>
<bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>
</jaxws:outInterceptors>
</jaxws:endpoint>
</beans>
このサンプルコードは、Web サービスがユーザー名
token とデジタル署名認証を合わせて利用できるように設定しています。
注記
jaxws:endpoint 要素には、implementor と呼ばれる属性があります。この属性は、JAX-WS サービスを実装する Java クラスを定義します。BPEL Console は、このクラスを動的に自動作成します。そのため、この属性の値は @provider@ にしなければ機能しません。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.