Jolt 1.1 User Guides

Example 6-5, tryOnFml.f16 Field Definitions is the TUXEDO FML field definitions table used by the PASSFML service.
Example 6-6, tryOnFml.c Source Code is the server code fragment that contains the server side C code for handling the data sent by
the Jolt client.
tryOnFml.java Client Code
The tryOnFml.java Java code fragment in Example 6-4 illustrates how Jolt works with a service whose buffer type is FML. The following
example assumes that a session object was already instantiated.
Example 6-4. tryOnFml.java Source Code
/* Copyright 1997 BEA Systems, Inc. All Rights Reserved */
import bea.jolt.*;
class ...
{
...
public void tryOnFml ()
{
JoltRemoteService passFml;
String outputString;
int outputInt;
float outputFloat;
...
passFml = new JoltRemoteService("PASSFML",session);
passFml.setString("INPUTSTRING", "John");
passFml.setInt("INPUTINT", 67);
passFml.setFloat("INPUTFLOAT", (float)12.0);
passFml.call(null);
outputString = passFml.getStringDef("OUTPUTSTRING", null);
outputInt = passFml.getIntDef("OUTPUTINT", -1);
outputFloat = passFml.getFloatDef("OUTPUTFLOAT", (float)-1.0);
System.out.print("String =" + outputString);
System.out.print(" Int =" + outputInt);
System.out.println(" Float =" + outputFloat);
}
}
FML Field Definitions
The following entries in tryOnFml.f16 show FML field definitions for the tryOnFml.java example.
Example 6-5. tryOnFml.f16 Field Definitions
#
# FML field definition table
#
*base 4100
INPUTSTRING 1 string
INPUTINT 2 long
INPUTFLOAT 3 float
OUTPUTSTRING 4 string
OUTPUTINT 5 long
OUTPUTFLOAT 6 float
Define PASSFML in the Repository Editor
Using the STRING Buffer Type illustrated the SIMPAPP package with two services. The TOUPPER service was used to illustrate the
STRING typed buffer. The other service in SIMPAPP package is the PASSFML service. This service is used with the tryOnFml.java and
tryOnFml.c code. Before running Example 6-4, you need to modify the PASSFML service through the Jolt Repository Editor.