Retrieves data from a binary byte item (“byte[]” in Java) of a Jolt object attribute. This function is provided to retrieve data from both JoltSessionAttributes and JoltRemoteService object attributes.
Jolt.bdh
JoltGetCarray( in hJolt : number, in sAttribute : string, in sDefault : string allownull, in nDefaultSize : number, out sBinary : string allownull, in nBinarySize : number optional, out nBinaryLen : number optional, in nOccurrence : number optional): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
hJolt | Handle to a JoltSessionAttributes or JoltRemoteService object that was created with JoltSessionAttributesNew or JoltRemoteServiceNew, respectively |
sAttribute | Name of the attribute that is to be accessed |
sDefault | Binary data that the function accesses if the specified attribute or item does not exist |
nDefaultSize | Amount of binary data (in bytes) that the function accesses if the specified attribute or item does not exist |
sBinary | Buffer receiving the binary data |
nBinarySize | Size of the buffer that receives the binary data (optional). |
nBinaryLen | Variable receiving the actual amount of data (in bytes) that was received (optional). |
nOccurrence |
Index of the item that is to be retrieved (optional). The index of an attribute’s first item is 1 (not 0). If this parameter is omitted, the attribute’s first item is retrieved. Note: This parameter is ignored if hJolt represents a JoltSessionAttributes object. |
var hSession, hSessionAttr, hRemoteService: number; dcltrans transaction TInit begin JavaSetOption(JAVA_VERSION, JAVA_V11); JavaSetOption(JAVA_HOME, "c:/jdk1.1.7"); JavaSetOption(JAVA_CLASSPATH, "c:/jdk1.1.7"); JoltInit(); hSessionAttr := JoltSessionAttributesNew(); JoltSetString(hSessionAttr, APPADDRESS, "//lab:8000"); hSession := JoltSessionNew(hSessionAttr, "", "ATM", "", ""); hRemoteService := JoltRemoteServiceNew("XOR", hSession); end TInit; transaction TMain var sBinary : string; nBinaryLen : number; begin JoltSetCarray(hRemoteService, "PLAIN", "\h45E295AFD03B631200"); JoltSetCarray(hRemoteService, "PASSWORD", "secret\x00"); JoltCall(hRemoteService); JoltGetCarray(hRemoteService, "CODE", NULL, 0, sBinary); end TMain; transaction TShutdown begin JoltEndSession(hSession); JoltFreeObject(hRemoteService); JoltFreeObject(hSession); JoltFreeObject(hSessionAttr); end TShutdown;
Java: bea.jolt.JoltSessionAttributes class, bea.jolt.JoltRemoteService class