The Gateway Client enables execution of multiple operations using one or more of the web services the Gateway provides. It can be used to design batch jobs that require running more than one client. An example of one possible job would be obtaining SSTP registration data, sending it to the Gateway, and then passing it from the Gateway into a database using the SQL client. The client provides functionality for the Gateway's SQL, SSTP, SST Registration, Anti-Virus, MeF (test), and Rate calculation services.
The client requires an XML configuration file in order to initiate requests to various web services. Without the configuration file and with command line arguments omitted, the client will run in the SSTP GUI mode. When the client is run, it logs all operations and organizes them into a log folder, along with a main log file gateway-client-full.log .
The robust functionality requires a well structured configuration stored as an XML file. This section provides an overview of creating this XML configuration file as well as specific sections dealing with each client "module". The following is an example "skeleton" configuration you can copy and adapt to your needs based on which clients you wish to use. A sample configuration is available here. The schema that describes the configuration XML format is located here.
<gateway-client-config version="GWC2008V01" xsi:schemaLocation="http://gateway.sf.net/client/GWC2008V01 GWC2008V01.xsd" xmlns="http://gateway.sf.net/client/GWC2008V01" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<web-services>
<!-- Enter web service elements here -->
</web-services>
<databases>
<!-- Enter database elements here -->
</databases>
<modules>
<!-- Enter module elements here -->
</modules>
<notifications>
<e-mail-host>fake.email.host</e-mail-host>
<e-mail-from>fake.email@address.com</e-mail-from>
<!-- You may have any number of the following e-mail elements -->
<e-mail address="your.email@address.com" enabled="false"/>
<e-mail address="my.email@address.com" enabled="false"/>
<e-mail address="her.email@address.com" enabled="false"/>
<e-mail address="his.email@address.com" enabled="false"/>
</notifications>
</gateway-client-config>
To function properly the configuration XML will need to be populated with at least one web service, database, and module element.
The "notifications" section defines e-mail settings and addresses. All listed addresses will receive an e-mail upon completion of the client run. This e-mail will contain log information from each module that ran as well as the main Gateway Client. This is a useful feature for supervising scheduled client executions (through "cron" in Unix environments for example).
Multiple client modules may require a connection to the same web service, and perhaps they should all store their current status in the same database. These types of situations are easily handled in the new improved Gateway Services Client.
In order to configure the web service a client will connect to, the following XML section should be added to the "web-services" section.
<web-service provides="sql" name="sql-test">
<uri>http://localhost:8080/vt/services/SQLServiceSoap?wsdl</uri>
<user>TESTER001</user>
<pass>TESTPASS1</pass>
</web-service>
The "name=" is used to reference the web service in the module configuration step. The remaining 3 elements are used to define the web service address, username, and password. The "provides=" value must be set to a particular service identifier, one of the following:
sstp sql sstregister gatewayav mef
For database connections the configuration is similar:
<database name="myDBName" driver="org.hsqldb.jdbcDriver">
<host>file</host>
<user>DBUSER</user>
<pass>DBPASS</pass>
</database>
The "name=" refers to the database name you will be connecting to at the given host not just an arbitrary name. The "driver=" must refer to a valid JDBC driver to be used. The clients have varied support for Oracle, MySQL, and Hypersonic databases.
The following JDBC drivers are valid for the "driver=" value:
oracle.jdbc.driver.OracleDriver
org.hsqldb.jdbcDriver
com.mysql.jdbc.Driver
The following database limitations are listed below:
sql-client:
target: Hypersonic, MySQL
insert: Oracle
sstregister-client:
target: Hypersonic, MySQL
mef-client:
target: Oracle
Other databases supporting SQL can be added through changes to the source code with minimal complications. The limitations listed above are mainly due to long string support (text longer than 4000 characters must be stored as a CLOB in Oracle for example). The MeF Client will eventually be using XML database features specific to Oracle, currently is uses proprietary BLOB functionality.
Below are links to separate pages describing each client module in detail: