...
...
Data Services - Service Oriented Archictecture (SOA)- Overview
Nexaweb platform 4.5 introduces two new services for your applications to access enterprise data. Along with the existing data framework plug-in, Nexaweb platform now provides your applications with a full complement of options to access enterprise data through the Nexaweb server, using Web Services and SQL (based on Java Database Connectivity (JDBC)) data sources.
The following table describes all of the data services:
...
Configures SQL sources on the server and allows you to provide data from SQL sources to your applications declaratively, through tags you enter in the cliet UI file, or programatically, through MCOs or macros.
...
The data services framework allows you to define service requests for your applications to work with enterprise data available through web services and SQL type data services. In addition to defining data requests, you can also define multiple levels of processors for data requests.
Service Requests
The data services framework uses the following configuration files:
...
Nexaweb Platform 4.5 では、アプリケーションが企業データにアクセスするための新しいサービスが 2 つ導入されました。これにより、Nexaweb Platform では、既存のデータフレームワークプラグインに加え、Web サービスと、JDBC (Java Database Connectivity) に基づく SQL データソースを使用して、開発されたアプリケーションが Nexaweb サーバーを通じて企業データにアクセスするための完全なオプションが提供されるようになりました。
次の表では、これらすべてのデータサービスについて説明します。
データサービス | 説明 |
データフレームワーク プラグイン | クライアント UI ファイルにタグを入力するか、MCO やマクロを使用してプログラムで宣言することにより、サーバーや URL からドキュメントおよびオブジェクト データソースへのアクセスを提供します。 |
SQL | サーバーサイドでの SQL ソースを設定します。クライアント UI ファイルにタグを入力するか、MCO やマクロを使用してプログラムで宣言することにより、SQL ソースからアプリケーションにデータを提供できます。 |
Web サービス | REST (Representational State Transfer) と SOAP (Simple Object Access Protocol) を使用して、サーバーサイドでの Web サービス リクエストを設定します。クライアント UI ファイルにタグを入力するか、MCO やマクロを使用してプログラムで宣言することにより、Web サービス ソースからアプリケーションにデータを提供できます。 |
データサービスの使用
データサー ビスフレームワークを使用すると、アプリケーションにサービスリクエストを定義して、Web サービスおよびSQL タイプデータサービスで使用可能な企業データを操作することができます。データリクエストを定義するだけでなく、データリクエストに使用されるプロセッサ の複数のレベルを定義することもできます。
サービスリクエスト
データサービスフレームワークでは、次のコンフィギュレーションファイルが使用されます。
コンフィギュレーションファイル | 説明 | ||
nexaweb-data.xml | Defines 定義の内容:
| ||
nexaweb-sql.xml | Defines 定義の内容:
| ||
nexaweb-webservices.xml | Defines 定義の内容: | Data Request Location | Use to
|
You can create service requests resources in various combinations of the following locations:
|
次の場所で定義されるサービスリクエストのリソースを、組み合わせて作成することができます。
データリクエストの場所 | 使用目的 |
nexaweb-data.xml | Define on the server dataRequestDefinitions to use in service requests Use arguments in service requests
|
nexaweb-sql.xml | Define on the server sql statements to reference in dataRequestDefinitions
|
nexaweb-webservices.xml | Define on the server REST or SOAP requests to reference in dataRequestDefinitions |
Client UI file | Define in-line (embedded) SQL or web services (REST and SOAP) service requests that do not use arguments Use shortcut syntax to define inline SQL statements Reference dataRequestDefinitions defined on the server |
Thus, depending upon the resources that you want to use, you can access enterprise data in a number of ways.
The primary components of a service request include:
- An SQL statement or REST or SOAP request
- Service request event handlers
- Processors to format data on either end of the request
In addition, if you use a dataRequestDefinition in a serviceRequest, you can specify arguments for that serviceRequest.
Processors
The data services framework allows you to specify processors to format the data sent by service requests or as the result of service requests into the appropriate structures in the general data services configuration file and the data service type configuration files. You can then assign muliple layers of processors to apply to service requests in various combinations.
You define processors in the requestprocessorDefinitions section of the nexaweb-data.xml file as pre- or post-processors. You then assign processors as follows:
Processor | Applies To | Location |
globalProcessors | Specifies pre- and post-processors used for all service requests for both SQL and web services type data services by default.
| |
クライアント UI ファイル |
|
このように、使用するリソースに応じてさまざまな方法で企業データにアクセスすることができます。
サービスリクエストの主なコンポーネントには次のものがあります。
- SQL 文、または REST または SOAP リクエスト
- サービス リクエストのイベント ハンドラ
- リクエストのいずれかの側でデータの書式設定を行うプロセッサ
プロセッサ
データ サービスフレームワークを使用すると、サービスリクエストによって送信されたデータまたはサービスリクエストの結果としてのデータを、一般的なデータサー ビスのコンフィギュレーションファイルおよびデータサービスタイプのコンフィギュレーションファイルで、適切な構造に書式設定するようにプロセッサで指定 できます。その後でプロセッサの複数層を指定して、さまざまな組み合わせでサービスリクエストに適用することができます。
nexaweb-data.xmlファイルの requestprocessorDefinitions セクションで、プロセッサをプリプロセッサまたはポストプロセッサとして定義します。次に、プロセッサを次のように指定します。
プロセッサ | 適用先 | 場所 |
globalProcessors | デフォルトで、すべてのサービスリクエストに使用されるプリプロセッサとポストプロセッサを、SQL および Web サービスタイプデータサービスに指定します。 | nexaweb-data.xml |
dataServiceDefinitions Specifies pre- and post-processors for the specified data service type, SQL or web services. | プリプロセッサとポストプロセッサを、特定のデータ サービス タイプ、SQL、または Web サービスに指定します。 | nexaweb-data.xml |
dataRequestDefinition | Specifies pre- and post-processors per service request defined in the nexaweb- プリプロセッサとポストプロセッサを、nexaweb-data.xml file.ファイルで定義されているサービス リクエストごとに指定します。 | nexaweb-data.xml |
statementHandlerDefinitions | Specifies pre- and post-processors per SQL statements defined in the nexaweb- プリプロセッサとポストプロセッサを、nexaweb-sql.xml file.ファイルで定義されている SQL 文ごとに指定します。 | nexaweb-sql.xml |
The data service runs processors in the following order:
- Globally defined
- Data service specific
- Request specific
Setting Up Data Services
To use data services, you must:
...
- As dataRequestDefinitions in the nexaweb-data.xml file. For more information, see Configuring Data Services and Handlers.
- As SQL statements or web services requests in their respective configuration files, nexaweb-sql.xml or nexaweb-webservices.xml.
See Accessing SQL Data Sources, or Accessing Web Services Data Sources.
...
データサービスは、次の順序でプロセッサを実行します。
- グローバルに定義されたプロセッサ
- データ サービス特有のプロセッサ
- リクエスト特有のプロセッサ
データサービスのセットアップ
データサービスを使用するには、次の作業を行う必要があります。
- nexaweb-data.xmlコンフィギュレーション ファイルの requestProcessorDefinitions セクションでプロセッサを定義します。詳細については、「データ サービスとハンドラの設定」を参照してください。
- また、nexaweb-data.xml コンフィギュレーション ファイルの dataServiceDefinition セクションで、データ サービス タイプにプロセッサを指定します。詳細については、「データ サービスとハンドラの設定」を参照してください。
- また、サーバーサイドの serviceRequest コンポーネントを次のように定義します。
- nexaweb-data.xml ファイルで dataRequestDefinitions として定義します。詳細については、「データ サービスとハンドラの設定」を参照してください。
- nexaweb-sql.xml または nexaweb-webservices.xml の各コンフィギュレーション ファイルで、SQL 文または Web サービス リクエストとして定義します。
「SQL データ ソースへのアクセス」または「Web サービス データ ソースへのアクセス」を参照してください。
- データ サービス プラグインをクライアント アプリケーションに追加します。
- serviceRequests または embeddedServiceRequests をクライアント UI ファイルに追加します。詳細については、「サービス リクエストの作成」を参照してください。
Child pages (Children Display) |
---|