In this section: |
This section provides scripting tutorials for iWay Integration Application (iIA).
How to: |
The scripting tutorial in this section focuses on the advanced use of iIA, which includes altering the current iWay installation.
The following procedure develops an Ant script that creates a backup directory under the iWay Home directory. The script will be added to an application as a file resource and then invoke the remote Ant script using the iwscript iWay Ant task.
To invoke an Ant script remotely:
The new XML file wizard is located under the XML section, as shown in the following image.
After opening the XML file and writing the project XML tag, the XML editor will be replaced with the Ant editor. The remote Ant file is shown in the following image.
The Ant file has one target in it, the mkdir. It uses the environment variable on the remote machine to find the iWay home directory and creates a backup directory there.
The following execution log is produced.
Notice that the successful creation of a new backup directory on the remote machine was reported. It results in a permanent change of the iWay installation, which will be in effect even if the entire Ant application is deleted.
Note: Because of how powerful the remote Ant script invocation feature can be, it has to be used carefully, with awareness of the possibility to produce irreversible changes to your environment.
This section describes how to add new targets to the Ant script, which will contain the following tasks:
The following sample syntax contains the exact snippets of these additional targets:
Note that the user name and password are assumed to be the same across the enterprise installations of iWay. If that was not the case, the above script would have increased complexity to it.
Running the script produces a trace similar to the following:
The application and the template were uploaded and deployed together on both servers.
|
iWay Software |