Help-Site Computer Manuals
  Algorithms & Data Structures   Programming Languages   Revision Control
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac
SOAP Adapter for ActiveWorks Brokers - SOAP Adapter for ActiveWorks Brokers

NAME - SOAP Adapter for ActiveWorks Brokers


 % ./ &


This script acts as a SOAP server for ActiveWorks brokers and is part of the SOAP-Lite-ActiveWorks distribution. This adapter can facilitate SOAP structured requests published by an ActiveWorks client application or forwarded from an HTTP server. The SOAP request may contain a URI for a Perl class and method to instantiate and invoke or may contain a URI for an ActiveWorks request to publish.

This adapter subscribes to the SOAP::Request event type and always replies with a SOAP::Reply event type. The event type and client group configuration needed is provided in the server/broker-config/ file which should be imported and saved in your target broker using the ActiveWorks 'evtype_editor'. See the ``README'' file included with this package.

Traditional SOAP

To use the adapter as a SOAP server in the classic SOAP-Lite paradigm, install modules that you want accessible to the server in some 'U<SafeModules>' directory. The simple 'server/SafeModules/Calculator' module has been provided for demonstration purposes.

With the adapter running you may access the 'Calculator' class with the native ActiveWorks Perl script client/ which uses a ActiveWorks broker as a proxy server (be sure to modify the 'proxy' autodispatcher parameter for your site).

The same 'Calculator' class may be accessed through an HTTP server when an ActiveWorks URI is used. The script provides an example (again be sure to update the proxy server and uri hosts for your installation).

Finally, with the 'Calculator' class installed under an HTTP server, the script demonstrates using an ActiveWorks proxy broker with an HTTP class URI.

Events as SOAP Accessible Classes

With a SOAP structured request the adapter may be used as a gateway broker to access events on a broker that may be unaccessible to the requesting client. The script demonstrates this when both an ActiveWorks 'proxy' and 'uri' parameters are used with the autodispatcher. This demonstration requires also the script that comes with the Aw module. Note that in this example we are treating ActiveWorks events as if they were deployed modules.

A '%safe_events' hash exists at the top of this the adapter. You may set in this hash the 'SafeEvents' that you want to grant access to. The hash is a table of event type names mapped to their respective URIs or a specified subroutine (see Callback Handlers next).

'Pseudo Classes' are similar in that they are ActiveWorks events treated as SOAP accessible classes on the client side. An ActiveWorks URI is specified for the class, but, the proxy server will publish a specified native ActiveWorks event type and not a SOAP::Request event type that would be received by this adapter. See the and for examples.

Callback Handlers

You may find it necessary to perform special operations for a given request or decide not to use the 'SafeModules' approach for some reason. The '%safe_events' hash will accept a mapping of an class or event type name to a code reference.

The script demonstrates this usage, the request is handled in the 'handle_time_request' subroutine.


 The Aw package for Perl interfaces to ActiveWorks libraries.

 The SOAP-Lite package.

 The SOAP-Lite-ActiveWorks package.