7.5. SOAP Web サービスの消費
この項では、Cheat Sheet を使用して SOAP Web Service を消費する方法を説明します。パブリックでアクセス可能な Web サービスへの接続について実証します。このプロセスは、他の Web サービスのモデリングの例として使用できます。
Cheat Sheet を開く
Designer メニューから Cheat Sheet にアクセスできます。Designer メインメニューから Window > Show View > Other... と選択し、ダイアログで Help > Cheat Sheets を選択します。Guide View から Cheat Sheet にアクセスすることもできます。以下の Guide ビューの例では、Consume a SOAP Web Service アクションが選択されています。図7.17 Guides ビュー
Guide View から Cheat Sheet を開くには、Guide View の下部にある Cheat Sheet のセクションを展開し、Consume a SOAP Web Service リンクを選択します。Cheat Sheet の開始
以下は Consume a SOAP Web Service の Cheat Sheet です。図7.18 Consume SOAP Web Service の Cheat Sheet
Cheat Sheet プロセスを開始するには、Introduction セクションを展開した後に Click to Begin を選択します。以下の Create New Teiid Model Project セクションが表示されます。図7.19 モデルプロジェクトの作成
注記
シートの各セクションには、各ステップで何を行うかを説明する基本手順が記載されています。Click
next to Launch New Teiid Model Project Wizard to launch the New Project wizard. Follow the wizard to create a new Model Project. For this example, we will use SOAPProjfor our project name. On the second page of the wizard, select the sources and views folders. Click Finish. The new project is created.In the Cheat Sheet, you can advance to the next step - once the wizard has completed. Click
to advance to the next step.
Create SOAP Web Service Connection
Cheat Sheet のこのセクションには、以下のように SOAP Web Service の接続プロファイルを作成する手順が記載されています。図7.20 SOAP 接続プロファイルの作成
Click
next to Launch Create SOAP Connection Profile Wizard to launch the wizard. The first page of the wizard is shown below:
図7.21 SOAP 接続プロファイルの作成
Web Services Data Source (SOAP) プロファイルタイプが選択されます。プロファイル名として CountryInfoConn を入力し、Next をクリックします。以下はウィザードの次のページになります。図7.22 SOAP 接続プロパティー
The connection profile properties are entered on this page. Click the URL... button, then enter the following URL: http://www.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL. Select None for SecurityType, then click OK to complete the wizard. In the Cheat Sheet, you can now continue - once the wizard has completed. Click
to advance to the next step.
Create Models from SOAP Connection
Cheat Sheet のこのセクションには、以下のように前の手順で作成された SOAP Web Service の接続プロファイルを使用してリレーショナルモデルを作成する手順が記載されています。図7.23 Create Models from SOAP Connection
Click
next to Launch the Consume SOAP Web Service Wizard to launch the wizard. The first page of the wizard is shown below:
図7.24 SOAP ウィザードの消費
Connection Profile では、以前の手順で作成した CountryInfoConn プロファイルを選択します。選択すると、Select the desired WSDL Operations の下に利用可能な WSDL 演算が表示されます。この例では、最初の CapitalCity 演算のみを選択します。Next をクリックして、以下のように次のページに進みます。図7.25 SOAP ウィザードの消費
Model Definition ページでは、ソースおよびビューモデル情報のセクションが事前入力されています。ソースとビューモデルのデフォルトの名前と場所をそのまま使用します。Next をクリックし、以下のように次のページに進みます。図7.26 SOAP ウィザードの消費
Procedure Definition ページでは、この例で唯一使用される CapitalCity 演算が選択されます。 Request タブで sCountryISOCode 要素を選択した後、Add ボタンをクリックします。これで、選択された要素がリクエストに追加されます。以下のように Response タブを選択します。図7.27 SOAP ウィザードの消費
Response タブで Body サブタブを選択します。Schema Contents で CapitalCityResult を選択した後、Add ボタンをクリックします。Wrapper Procedure タブを選択し、以下のように完全な生成されたプロシージャの SQL を表示します。図7.28 SOAP ウィザードの消費
Click Finish to exit the wizard. In the Cheat Sheet, you can now continue. Click
to advance to the next step.
Create VDB
Cheat Sheet のこのセクションには、以前のステップで作成したモデルを使用して VDB を作成する手順が記載されています。Cheat Sheet のセクションは次のとおりです。図7.29 Create VDB
Click
next to Launch New VDB Wizard to launch the wizard. Follow the steps to create a VDB in your workspace. When complete, exit the wizard. In the Cheat Sheet, you can now continue. Click
to advance to the next step.
Test VDB
This final section of the Cheat Sheet provides instructions for executing the VDB created in the previous step. Click
next to Launch Execute VDB Dialog to launch the wizard. Select the previously created VDB to execute it.