ページの先頭行へ戻る
Interstage Application Server/Interstage Web Server J2EE ユーザーズガイド

18.6.2 webservices.xmlのタグ

Webサービス環境定義ファイル(webservices.xml)には、以下のタグを指定できます。

定義する内容

タグ名

説明

タグの
省略

複数の
指定

webservices

webservices.xmlの開始と終了を定義します。

×

×

webservice-description

一つのWebサービスに関する定義を記述します。

×

webservice-description-name

Webサービスの名前を定義します。
webservices.xml内で一意の値とする必要があります。

注) 以下の文字は使用できません。
    ','、'='、':'、'*'、'?'、'"'の記号

×

×

wsdl-file

モジュール内のWSDLのパスを定義します。

×

×

jaxrpc-mapping-file

モジュール内の<WSDLファイル名>_mapping.xmlのパスを定義します。

×

×

port-component

1つのポートに関する定義を記述します。

×

port-component-name

ポートの名前を定義します。
webservices.xml内で一意の値とする必要があります。

注) 以下の文字は使用できません。
    ','、'='、':'、'*'、'?'、'"'の記号

×

×

wsdl-port

WSDL内の対応するポートのQNameを定義します。wsdl-fileタグで指定したWSDLファイルに定義されたポートである必要があります。
ポートのQNameは、WSDLのport要素のname属性で指定され、その値はWSDLのdefinitions要素のtargetNamespace属性で指定されたネームスペースに属します。

注) webservices.xml内の複数のwsdl-portタグで、WSDLの同一のポートを指定することはできません。

×

×

service-endpoint-interface

サービスエンドポイントインタフェースの完全修飾名を定義します。

×

×

service-impl-bean

Webサービス実装クラスの定義を記述します。

×

×

servlet-link

Webサービスに対応するweb.xml内のサーブレット名を定義します。

注) webservices.xml内の複数のservlet-linkタグで同一のサーブレットを指定することはできません。
注) servlet-linkまたはejb-linkのいずれか一方のみを必ず指定する必要があります。

×

ejb-link

Webサービスに対応するejb-jar.xml内のSTATELESS Session Beanのejb-nameを指定します。

注) webservices.xml内の複数のejb-linkタグで同一のEJBアプリケーションを指定することはできません。
注) servlet-linkまたはejb-linkのいずれか一方のみを必ず指定する必要があります。

×

注意

  • 省略が“×”であるタグは、省略すると配備できません。

  • 複数の指定が“×”であるタグを重複して指定すると配備できません。

モジュール構成が、以下の場合の例です。

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>