| Interstage Application Server/Interstage Web Server J2EE ユーザーズガイド |
目次
索引
![]()
|
| 第4部 Webサービス編 | > 第18章 Webサービスの開発 | > 18.6 Webサービス環境定義ファイル(deployment descriptor) |
WebサービスクライアントアプリケーションからJNDIを使用してServiceをlookupする場合、クライアントアプリケーションの形態に応じて以下のdeployment descriptorにservice reference記述を追加する必要があります。
対象となるdeployment descriptorに<service-ref>タグを追加し、Webサービス参照についての定義を記述してください。
以下の表にないタグについては、“Webアプリケーション環境定義ファイル(deployment descriptor)”、“J2EEアプリケーションクライアントのdeployment descriptorファイルの詳細設定”、または“deployment descriptorファイルへの記述”を参照してください。
|
要素名 |
説明 |
タグの |
複数の |
|---|---|---|---|
|
service-ref |
Webサービス参照についての定義を記述します。 |
○ |
○ |
|
service-ref-name |
JNDIに登録する名前を定義します。“service/”で始まるように定義してください。 |
× |
× |
|
service-interface |
Serviceインタフェースの完全修飾クラス名を定義します。 |
× |
× |
|
wsdl-file |
iswsgenコマンドまたはInterstage Studioを使用してスタブおよびクライアントアプリケーションを作成した場合、本要素は省略してください。 |
○ |
× |
|
jaxrpc-mapping-file |
<WSDLファイル名>_mapping.xmlをモジュールのルートから相対パスで定義します。wsdl-fileを指定した場合は本要素は省略不可です。 |
○ |
× |


WebアプリケーションからServiceをlookupする場合(web.xml)
<?xml version="1.0" encoding="UTF-8"?>
<web-app 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/web-app_2_4.xsd version="2.4">
<display-name>StockQuote Client</display-name>
...
<service-ref>
<description>WSDL Service StockQuote </description>
<service-ref-name>service/StockQuote</service-ref-name>
<service-interface>stock.server.StockQuoteProviderService</service-interface>
</service-ref>
</web-app> |
目次
索引
![]()
|