Using the Java Gateway to access the ESIObjects server on GTM.
I'm calling NextElement and GetElement methods to extract information from the database.
Is there anything supposed to be returned on a virgin installation (I've not created any objects yet)?
Here's the code:
invokeResult = theGateway.invoke(libraryListOID,"NextElement",0,null); System.out.println("\tNextElement invoke result:"+invokeResult.getString()); invokeResult = theGateway.invoke(libraryListOID,"GetElement",0,null); System.out.println("\tGetElement invoke result:"+invokeResult.getString()); invokeResult = theGateway.invoke(libraryListOID,"NextElement",0,null);
And here's the result:
NextElement invoke result: base GetElement invoke result: null
Are those the results you'd expect?
Thanks
Richard Schilling
Richard,
How are you creating libraryListOID?
Sorry - forgot to include that.
System.out.println("$Library lookup:"); String libraryListOID = theGateway.lookupObject("$LibraryList").getString(); System.out.println("\tfound:"+libraryListOID); And here is the output that is generated from this code snippet:
$LibraryList lookup: found:N^VESOL("I")
BTW: I wrote this code to lookup the library information following the techniques found in sessionview.cpp (the ESIObjects source).
Richard
Ah I see the problem... It's a simple coding error!
OIn the call to GetElement, you need to pass in the name of the element to fetch (In this case "Base")
You are currently passing null for the element to get!
Log in to post a comment.
Using the Java Gateway to access the ESIObjects server on GTM.
I'm calling NextElement and GetElement methods to extract information from the database.
Is there anything supposed to be returned on a virgin installation (I've not created any objects yet)?
Here's the code:
invokeResult = theGateway.invoke(libraryListOID,"NextElement",0,null);
System.out.println("\tNextElement invoke result:"+invokeResult.getString());
invokeResult = theGateway.invoke(libraryListOID,"GetElement",0,null);
System.out.println("\tGetElement invoke result:"+invokeResult.getString());
invokeResult = theGateway.invoke(libraryListOID,"NextElement",0,null);
And here's the result:
NextElement invoke result: base
GetElement invoke result: null
Are those the results you'd expect?
Thanks
Richard Schilling
Richard,
How are you creating libraryListOID?
Sorry - forgot to include that.
System.out.println("$Library lookup:");
String libraryListOID = theGateway.lookupObject("$LibraryList").getString();
System.out.println("\tfound:"+libraryListOID);
And here is the output that is generated from this code snippet:
$LibraryList lookup:
found:N^VESOL("I")
BTW: I wrote this code to lookup the library information following the techniques found in sessionview.cpp (the ESIObjects source).
Richard
Ah I see the problem... It's a simple coding error!
OIn the call to GetElement, you need to pass in the name of the element to fetch (In this case "Base")
You are currently passing null for the element to get!