[SERVICES_EXEC]

Use the [SERVICES_EXEC] section of the assignment file to direct the execution of service components to a network path, COM, or SOAP connector, and to redefine the behavior of COM and SOAP connectors for specific components.

Syntax

[SERVICES_EXEC]
ServiceComponentName{=} $Path:*{Parameters}

For example:

[SERVICES_EXEC]
MyService = $REMOTE:MyService

Arguments

  • ServiceComponentName—component name (not the instance name) of the service component. Wildcards are allowed in ServiceComponentName.
  • $Path—name of a path (specified in the [PATHS] section) that leads to a remote Uniface server (via a TCP network connector), or to COM connector or SOAP connector.
  • Parameters—comma-separate list of COM properties or SOAP connector parameters to be used only for the specified ServiceComponentName; for COM and SOAP connectors only.

    For more information, see Configuring Uniface for COM Support and SOAP Connector Options.

Description

Settings in the [SERVICES_EXEC] section enable you to define some aspects of a service's behavior.

For example, you can specify any of the following:

  • A Uniface service should be executed remotely instead of locally.
  • A 3GL component should be executed as a specific COM class.
  • A web service should use a different proxy server than the one specified for all SOAP web services
  • The location of the WSDL file for a web service.

Settings in the [SERVICES_EXEC] section override the corresponding connector-wide options specified in the [DRIVER_SETTINGS] section.

The connector-wide options in USYS$SOP_PARAMS cannot be removed; they can only be overridden with another value.

Redirecting Services

You can redirect services to be executed by a different Uniface Server. For example, the following assignments redirect a service MyService to a Uniface Server running on the $REMOTE path:

[PATHS]
$REMOTE	$TCP:host+port|user|pass|ust

[SERVICES_EXEC]
MyService = $REMOTE:MyService

When you activate MyService in ProcScript, for example:

activate calc."MyService"(parm1, parm2)

Uniface transparently transports all the input parameters to the remote service and transports the output parameters back to the caller of that operation.

However, for services that handle SOAP requests, this is possible only for parameters with simple data types. Constructed parameters will return an error. To use entity or occurrence parameters, the component specified by the activate call and the actual SOAP callout must be in the same application. You can activate SOAP callout in a client or in a server, but you cannot reassign that callout to another application if the parameters are entities or occurrence.

Using a Network Path

In the following example, the client assignment file directs services and reports to a network path $NET1. This path opens a TCP connection to the host machine HOST1, where the Uniface Router uses the UST (server name) ’ASV’ to start a Uniface Server (an application server instance) using the assignment file asv.asn. The application server then locates the services and reports on the local file system.

; Client assignment file
[PATHS]
$NET1 = TCP:HOST1|?|?|ASV

[SERVICES_EXEC]
* = $NET1:*
[REPORTS_EXEC]
* = $NET1:*

The Router on HOST1 uses the server name ASV to start an application server instance using the assignment file asv.asn.

; router.asn - Router assignment file on HOST1
[SERVERS]
ASV = userver.exe /asn=asv.asn
DATA = userver.exe /asn=data.asn

Assignments in the [ENTITIES] and [FILES] sections of the application server's assignment file asv.asn direct entities to a data server on HOST1 (not shown in example) and non-DBMS files to the local file system.

; asv.asn - ASV assignment file on HOST1
[PATHS]
$NET2 = TCP:HOST1|kaye|birdbrain|DATA

[ENTITIES]
*.* = $NET2:*.*

[FILES]
*.svc = d:\unifiles\*.svc
*.rpt = d:\unifiles\*.rpt

Call-out to a Web Service via SOAP

The following example of the [SERVICES_EXEC] section directs the service component COMP1, executing call-out to a Web service, to the SOAP connector, with user authentication at the client and at the end-point web server:

[DRIVER_SETTINGS]
SOP U2.0
USYS$SOP_PARAMS = puser=user1 ppass=password1 scheme=B Callout 1

[SERVICES_EXEC]
COMP1 $SOP:COMP1 proxy=proxyhost euser=user2 epass=password2 Callout 2
  1.  From the options specified in the [DRIVER_SETTINGS] section of this example, all components using the SOAP connector (unless overridden by options in the [SERVICES_EXEC] section) will use the current user’s Microsoft Internet Explorer settings to identify the proxy server (the default), which will be supplied with user name user1 and password password1 for Basic authentication.
  2.  The component COMP1 will use the default connector-wide options specified in the [DRIVER_SETTINGS] section of this example, bu t will also use the overriding options in the [SERVICES_EXEC] section to use the proxy server proxyhost, and to use user name user2 and password password2 for endpoint authentication on the Web server.

When Basic endpoint authentication is required for the web server, you must also supply the user name and password in the WSDL file path when you import the WSDL of the Web service. For more information, see Importing WSDL Definitions for Web Services.

For an explanation and examples of using the SOAP parameters, see [DRIVER_SETTINGS] and SOAP Connector Options.

Specifying Callback Services for Call-Out

When using the SOAP U2.0 connector, you can create a Uniface service (for example, SoapCallbackService) that implements SOAP callback operations that should be called for all web services that Uniface activates. For some web services, you may want to provide special processing in the callback operations, so you create some other Uniface services to implement this behavior (CallbackSvcPre and CallbackSvcPost).

In the [DRIVER_SETTINGS] section, specify the generic callback service using the SOAP connector option callback.

[DRIVER_SETTINGS]
SOP U2.0
USYS$SOP_PARAMS = callback=SoapCallbackService

In the [SERVICES_EXEC] section, override the generic callback service for specific web services by specifying different services in the callback option:

[SERVICES_EXEC]
WebService1=SOP:WebService1 callback=CallbackSvcPre, CallbackSvcPost
WebService2=SOP:WebService2 callback=CallbackSvc2

Note:  If your SOAP callback service uses entity or occurrence parameters, it is not possible to reassign it to another application in the [SERVICES_EXEC] section.

For more information, see SOAP Callback Operations for Web Services Call-Out.

Related Topics