<< 2006/04/09 | Home | 2006/04/11 >>
PR: 転職    葬式    マンスリーマンション 神戸    北海道    環境    FX    不動産担保融資    桐ヶ谷斎場    海外旅行    専門学校   

PofEAA早わかりガイド

開発の現場No004に記事を書かせていただきました。

ページ数の関係で掲載できなかった分は、こちらに置いてあります。

WSDLの生成

jax-rpcの頃って、あらかじめWSDLを作成してwarに仕込んでいたように記憶しているのだけど、JavaEE5のwsgenで作ると、WSDLが生成されない。どうやらコンテナ側で動的に生成されているようだ。JAX-WS 2.0のspecを読んでみたら、5.2.2に以下の記述があった。

The WSDL contract for an endpoint is created dynamically based on the annotations on the implementor class, the Binding in use and the set of metadata documents specified on the endpoint (see 5.2.4).
Conformance (WSDL Publishing): An Endpoint that uses the SOAP 1.1/HTTP binding (see 10) MUST make its contract available as a WSDL 1.1 document at the publishing address suffixed with ”?WSDL” or ”?wsdl”.

で、5.2.4も見てみると、

A set of metadata documents can be associated with an Endpoint by means of the setMetadata- (List) method. By setting the metadata of an Endpoint, an application can bypass the auto- matic generation of the endpoint’s contract and specify the desired contract directly. This way it is possible, e.g., to make sure that the WSDL or XML Schema document that is published contains information that cannot be represented using built-in Java annotations (see 7).

アノテーションでバイトコードに仕込まれたメタデータからWSDLを自動生成するけど、ユーザが自分で与える事も可能のようだ。

このサイトの掲載内容は私自身の見解であり、必ずしもIBMの立場、戦略、意見を代表するものではありません。
日本アイ・ビー・エム 花井 志生 Since 1997.6.8