Show Table of Contents
3.2.4. Web サービスの変更
3.2.4.1. Web サービスの変更
JBoss EAP 6 は、JAX-WS Web サービスエンドポイントのデプロイメントをサポートします。このサポートは JBossWS によって提供されます。Web サービスの詳細は、https://access.redhat.com/site/documentation/JBoss_Enterprise_Application_Platform/ にある JBoss EAP 6 向け『開発ガイド』の章「JAX-WS Web サービス」を参照してください。
JBossWS 4 には、移行に影響する可能性がある以下の変更が含まれています。
- JBossWS API の変更
- JBossWS では、SPI および Common コンポーネントがリファクタリングされました。下表は、アプリケーションの移行に影響する可能性がある API およびパッケージの変更を表しています。
表3.8 JBossWS API の変更
従来の JAR 従来のパッケージ 新しい JAR 新しいパッケージ JBossWS SPI org.jboss.wsf.spi.annotation.* JBossWS API org.jboss.ws.api.annotation.* JBossWS SPI org.jboss.wsf.spi.binding.* JBossWS API org.jboss.ws.api.binding.* JBossWS SPI org.jboss.wsf.spi.management.recording.* JBossWS API org.jboss.ws.api.monitoring.* JBossWS SPI org.jboss.wsf.spi.tools.* JBossWS API org.jboss.ws.api.tools.* JBossWS SPI org.jboss.wsf.spi.tools.ant.* JBossWS API org.jboss.ws.tools.ant.* JBossWS SPI org.jboss.wsf.spi.tools.cmd.* JBossWS API org.jboss.ws.tools.cmd.* JBossWS SPI org.jboss.wsf.spi.util.ServiceLoader JBossWS API org.jboss.ws.api.util.ServiceLoader JBossWS Common org.jboss.wsf.common.* JBossWS API org.jboss.ws.common.* JBossWS Common org.jboss.wsf.common.handler.* JBossWS API org.jboss.ws.api.handler.* JBossWS Common org.jboss.wsf.common.addressing.* JBossWS API org.jboss.ws.api.addressing.* JBossWS Common org.jboss.wsf.common.DOMUtils JBossWS API org.jboss.ws.api.util.DOMUtils JBossWS Native org.jboss.ws.annotation.EndpointConfig JBossWS API org.jboss.ws.api.annotation.EndpointConfig JBossWS フレームワーク org.jboss.wsf.framework.invocation.RecordingServerHandler JBossWS Common org.jboss.ws.common.invocation.RecordingServerHandler - @WebContext アノテーション
- JBossWS 3.4.x では、このアノテーションは JBossWS SPI JAR の
org.jboss.wsf.spi.annotation.WebContextとしてパッケージ化されていました。JBossWS 4.0 では、このアノテーションは JBossWS API JAR のorg.jboss.ws.api.annotation.WebContextに移動されました。アプリケーションに廃止された依存関係が含まれている場合は、アプリケーションのソースコードのインポートおよび依存関係を置き換え、新しい JBossWS API JAR に対してコンパイルする必要があります。また、後方互換性への非対応が変更になりました。String[] virtualHosts属性がString virtualHostに変更になりました。JBoss EAP 6 では、デプロイメント毎に 1 つの仮想ホストのみを指定できます。複数の Web サービスが@WebContextアノテーションを使用する場合は、デプロイメントアーカイブに定義されるすべてのエンドポイントで virtualHost の値が同じになるようにする必要があります。 - エンドポイントの設定
- JBossWS 4.0 は、JBoss Web Services スタックと、ほとんどの Apache CXF モジュールとの統合を実現します。統合レイヤーにより、JAX-WS を含む標準の Web サービス API を使用できます。また、複雑な設定を必要とせずに、JBoss EAP 6 コンテナ上で Apache CFX の拡張機能を使用できます。JBoss EAP 6 のドメイン設定にある
webserviceサブシステムには、事前定義されたエンドポイントの設定が含まれています。独自のエンドポイント設定を追加で設定することも可能です。指定のエンドポイント設定の参照には、@org.jboss.ws.api.annotation.EndpointConfigアノテーションを使用します。JBoss サーバーで Web サービスエンドポイントを設定する方法の詳細は、https://access.redhat.com/site/documentation/JBoss_Enterprise_Application_Platform/ にある JBoss EAP 6 向け『開発ガイド』の章「JAX-WS Web サービス」を参照してください。 - jboss-webservices.xml デプロイメント記述子
- JBossWS 4.0 には、Web サービスを設定する新しいデプロイメント記述子が導入されました。
jboss-webservices.xmlファイルが指定のデプロイメントの追加情報を提供し、廃止されたjboss.xmlファイルを部分的に置き換えます。EJB Web サービスデプロイメントでは、jboss-webservices.xml記述子ファイルの想定される場所はMETA-INF/ディレクトリー内になります。WAR ファイルでバンドルされた POJO および EJB Web サービスエンドポイントの想定される場所は、WEB-INF/ディレクトリーのjboss-webservices.xmlファイル内になります。以下にjboss-webservices.xml記述子ファイルの例と、要素を説明する表を示します。<webservices> <context-root>foo<context-root> <config-name>Standard WSSecurity Endpoint</config-name> <config-file>META-INF/custom.xml</config-file> <property> <name>prop.name</name> <value>prop.value</value> </property> <port-component> <ejb-name>TestService</ejb-name> <port-component-name>TestServicePort</port-component-name> <port-component-uri>/*</port-component-uri> <auth-method>BASIC</auth-method> <transport-guarantee>NONE</transport-guarantee> <secure-wsdl-access>true</secure-wsdl-access> </port-component> <webservice-description> <webservice-description-name>TestService</webservice-description-name> <wsdl-publish-location>file:///bar/foo.wsdl</wsdl-publish-location> </webservice-description> </webservices>表3.9 jboss-webservice.xml ファイル要素の説明
要素名 説明 context-rootWeb サービスデプロイメントのコンテキストルートをカスタマイズするために使用されます。config-nameconfig-file指定のエンドポイント設定へエンドポイントデプロイメントを関連付けするために使用されます。エンドポイント設定は、参照された設定ファイルまたはドメイン設定のwebservicesサブシステムに指定されます。プロパティーWeb サービススタックの挙動を設定するため、簡単なプロパティー名と値のペアを指定するために使用されます。port-componentEJB エンドポイントのターゲット URI のカスタマイズまたはセキュリティー関連プロパティーの設定に使用されます。webservice-descriptionWeb サービス WSDL がパブリッシュされる場所をカスタマイズまたは上書きするために使用されます。

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.