You can use Eclipse IDE to easily create the plug-ins.
Alternatively, you can build a function by using the Sun Java™ 6 SDK.
Before you begin
The example in this topic considers the default location of
IBM® Rational® Integration Tester.
About this task
To create a function without Eclipse:
Procedure
- Create a folder to develop the custom function.
For example: C:\customFunction.
- Create folders for the source and the build
output. For example: C:\customFunction\src and C:\customFunction\build.
- Copy plugin.xml and
MANIFEST.MF (in "META-INF") from C:\Program Files\IBM\Rational
Integration Tester\examples\FunctionsSamplePlugin into
the build directory. Both the files must be copied to the same target
directory (C:\custom\build).
- Create the required directory structure
under src to contain your custom function code.
If you have an existing code, copy the root package and all sub packages
under the src folder. For example: C:\custom\src\com\samples\functions\FormatDate.java.
- From the src folder,
compile the custom function into the build directory.
C:\customFunction\src javac
-d ../build -classpath .;"C:/Program Files/IBM/IBMIMShared/plugins/*"
com/samples/functions/FormatDate.java
- Edit MANIFEST.MF in your build directory
and change the following values:
Value |
Change to |
Bundle-Name |
Enter a descriptive name for the plug-in (for example, Format
Date Function). |
Bundle-SymbolicName |
Enter a unique ID that describes your plug-in. This ID must
be different from any other plug-in, as two plug-ins with the same
ID cannot be loaded at one time. Leave the "singleton:=true" part
untouched. |
Bundle-Vendor |
Enter your company’s name or some other provider description. |
- Open plugin.xml available
in the build directory using any text editor and update the values
as described in Configuring the extension point element.
- If you have a dependency on an external
library (JAR), follow the steps in the next topic, Adding external libraries.
- From the build directory, create a JAR containing
your custom function classes, MANIFEST.MF, and plug-in.xml.
c:\customFunction\build jar
cvfm custom-function-plug-in_1.0.0.jar META-INF\MANIFEST.MF com plugin.xml
Note: You can choose any name for your JAR, but you must
follow a convention that prevents conflicting names.
- Copy the new JAR file into the "Functions"
folder of your IBM Rational Integration Tester project.
When finished, follow the instructions to
load the function into IBM Rational Integration Tester (see Configuring the function in Rational Integration Tester).
Note: An example of how
the plug-in looks can be found under C:\Program Files\IBM\Rational
Integration Tester\FunctionsSamplePlugin.