Jolt 1.2 Developer's Guide

'// Choose the response template
If IsEmpty(Application("templates")) Then
Set template = Server.CreateObject("BEAWEB.Template")
Else
Select Case Request("SVCNAME")
Case "INQUIRY"
Set template = Application("templates")(INQUIRY)
Case "DEPOSIT"
Set template = Application("templates")(DEPOSIT)
Case "WITHDRAWAL"
Set template = Application("templates")(WITHDRAWAL)
Case "TRANSFER"
Set template = Application("templates")(TRANSFER)
End Select
End If
Next, call the NonStop
TM
TUXEDO service. In this example, the input data from the request
object is passed to the call() method of the session. The call() method uses the built-in ASP
Request object as input. The results of the call() are stored in the output object and an array,
iodata.
Set output = pool.call(Request("SVCNAME"), Null, Nothing)
Set iodata(1) = output
After you invoke the NonStop
TM
TUXEDO service, the output object and the second element of
the array iodata contain the results of the service call.
Note
In this example, because the initial form-specified field names match the TUXEDO service
parameter names, the Request object can be used in the call() method. If these names do not
match, create an input array with name=value elements for each service parameter before
invoking the call() method.
Returning the Results to the Client
At this stage, no results have been returned to the client. The final step sends an HTML page
containing the results of the service call back to the client. The HTML page consists of the
template merged with the data returned by the service call shown in the preceding example.
The template file contains placeholders for variable (call-specific) data. These placeholders are
identified by the special tag <%=NAME%>. In the code shown in the following example, an
index is used to indicate which occurrence of a parameter name is used. For example,
ACCOUNT_ID[0] specifies the first occurrence of the field ACCOUNT_ID.