To write a script filter, you must implement the invoke() method.
This method takes a com.vordel.circuit.Message object as a
parameter and returns a boolean result.
The Enterprise Gateway provides a Script library that contains a number of
pre-written invoke() methods to manipulate specific message attributes.
For example, there are invoke() methods to check the value of the
SOAPAction header, remove a specific message attribute, manipulate the message
using the DOM, and assign a particular role to a user.
You can access the script examples provided in the Script library by
clicking the Show script library button on the filter's main configuration
screen.
For a complete list of available message attributes, see the
Message Attribute
Reference.
Important Note:
When writing the JavaScript or Groovy code, you should note the following:
-
The
invoke() method must be
implemented.
-
The
invoke() method takes a
com.vordel.circuit.Message object as a parameter,
and returns a boolean.
-
You can obtain the value of a message attribute using the
getProperty method of the
Message object.
|