Invoking a User Method

To allow a Web session to bypass the standard processing loop, you can set up a command in the http string returned from the Web browser. This command has the following format.

_executeMethod=class-name::web_method-name

When you invoke a user method that bypasses the standard processing loop, your method name must consist of the web_ name prefix.

For example, if the http string is like that shown in the following example, the web_generateXML method in the Transaction class will be executed, passing the http string as a parameter.

http://persephone/jade/jadehttp.dll?MyWebApp&_executeMethod=Transaction::web_generateXML&TransactionType=CashOnly

The method that is executed must return a primitive type, which is converted to a Binary primitive type before being sent back to the Web browser. It is expected that the method will return a String value. In a Unicode JADE system, the contents of the returned string are converted from Unicode to UTF-8 before being sent back to the Web browser.

If the method does not exist or the return type is invalid, a default message is sent back to the Web browser. To override this message, you can reimplement the executeMethodNotFoundMessage method in the Application class of a user-defined schema.