Webサービス環境定義ファイル(webservices.xml)には、以下のタグを指定できます。
定義する内容
タグ名 | 説明 | タグの | 複数の |
---|---|---|---|
webservices | webservices.xmlの開始と終了を定義します。 | × | × |
webservice-description | 一つのWebサービスに関する定義を記述します。 | × | ○ |
webservice-description-name | Webサービスの名前を定義します。 注) 以下の文字は使用できません。 | × | × |
wsdl-file | モジュール内のWSDLのパスを定義します。 | × | × |
jaxrpc-mapping-file | モジュール内の<WSDLファイル名>_mapping.xmlのパスを定義します。 | × | × |
port-component | 1つのポートに関する定義を記述します。 | × | ○ |
port-component-name | ポートの名前を定義します。 注) 以下の文字は使用できません。 | × | × |
wsdl-port | WSDL内の対応するポートのQNameを定義します。wsdl-fileタグで指定したWSDLファイルに定義されたポートである必要があります。 注) webservices.xml内の複数のwsdl-portタグで、WSDLの同一のポートを指定することはできません。 | × | × |
service-endpoint-interface | サービスエンドポイントインタフェースの完全修飾名を定義します。 | × | × |
service-impl-bean | Webサービス実装クラスの定義を記述します。 | × | × |
servlet-link | Webサービスに対応するweb.xml内のサーブレット名を定義します。 注) webservices.xml内の複数のservlet-linkタグで同一のサーブレットを指定することはできません。 | ○ | × |
ejb-link | Webサービスに対応するejb-jar.xml内のSTATELESS Session Beanのejb-nameを指定します。 注) webservices.xml内の複数のejb-linkタグで同一のEJBアプリケーションを指定することはできません。 | ○ | × |
注意
省略が“×”であるタグは、省略すると配備できません。
複数の指定が“×”であるタグを重複して指定すると配備できません。
例
モジュール構成が、以下の場合の例です。
WARファイル |_ WEB-INF |_ classes |_ com |_ example |_ StockQuoteProvider.class |_ StockQuoteProviderImpl.class |_ web.xml |_ webservices.xml |_ wsdl |_ StockQuoteProviderPort.wsdl |_ StockQuoteProviderPort_mapping.xml
<?xml version="1.0" encoding="UTF-8"?> <webservices xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/j2ee_web_services_1_1.xsd" version="1.1"> <webservice-description> <webservice-description-name>StockQuoteProviderService</webservice-description-name> <wsdl-file>WEB-INF/wsdl/StockQuoteProviderPort.wsdl</wsdl-file> <jaxrpc-mapping-file>WEB-INF/StockQuoteProviderPort_mapping.xml</jaxrpc-mapping-file> <port-component> <port-component-name>StockQuoteProvider</port-component-name> <wsdl-port xmlns:pfx="http://example.com">pfx:StockQuoteProviderPort</wsdl-port> <service-endpoint-interface>com.example.StockQuoteProvider</service-endpoint-interface> <service-impl-bean> <servlet-link>StockQuoteServlet</servlet-link> </service-impl-bean> </port-component> </webservice-description> </webservices>