SOA and Data Services

Requires Platform 4.5+

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:

Data ServiceDescription
Dataframework plug-inProvides access to document and object datasources from the server and URLs declaratively, through tags you enter in the client UI file, or programatically through MCOs or macros.

SQL

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.

Web ServicesConfigures web service requests through Representational State Transfer (REST) and Simple Object Access Protocol (SOAP) on the server and allows you to serve data from web service sources to your applications declaratively, through tags you enter in the client UI file, or programatically, through MCOs or macros.


Using Data Services

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: 

Configuration FileDescription

nexaweb-data.xml

Defines:

  • Data service types
  • Data service type processors
  • Processors for all data services requests
  • Data request definitions 

nexaweb-sql.xml

Defines:

  • SQL connections to databases
  • SQL statement processors
  • SQL statements

nexaweb-webservices.xml

Defines:

  • Web services request processors
  • Representational State Transfer (REST) requests
  • Simple Object Access Protocol (SOAP) requests 

 You can create service requests resources in various combinations of the following locations:

Data Request LocationUse to
nexaweb-data.xmlDefine on the server dataRequestDefinitions to use in service requests
Use arguments in service requests
nexaweb-sql.xmlDefine on the server sql statements to reference in dataRequestDefinitions
nexaweb-webservices.xmlDefine on the server REST or SOAP requests to reference in dataRequestDefinitions
Client UI fileDefine 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:

ProcessorApplies ToLocation
globalProcessorsSpecifies pre- and post-processors used for all service requests for both SQL and web services type data services by default.nexaweb-data.xml
dataServiceDefinitionsSpecifies pre- and post-processors for the specified data service type, SQL or web services.nexaweb-data.xml
dataRequestDefinitionSpecifies pre- and post-processors per service request defined in the nexaweb-data.xml file.nexaweb-data.xml
statementHandlerDefinitions Specifies pre- and post-processors per SQL statements defined in the nexaweb-sql.xml file.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: