What object pointer is used for user information, and how do I obtain the object pointer for the GetUserInfo call? Here's the call in the Java Gateway.
$Environment ($Env) contains a pointer to the current server session object. $Env.Security::UserManager will return a UserManager object that GetUserInfo can be invoked on. It returns an ESI$Table object loaded with user information.
Hope I got that right.
Terry L. Wiechmann
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks again - that seems to have gotten me a step further, but I don't understand exactly what the server sends back. I was expecting my Table object (which is the first elements of array Parameters in the second invoke call below). What I see on the wire is the server sending back the following:
N%objcf(4,49,1)
I'm not sure what to do with that - sorry, I know it's an "ESI rookie" type of question.
Here's what I have for code:
// var_EnvironmentString is the Variant returned by the lookupObject call for $ENV.
The N%objcf(4,49,1) is the OID of the ESI$Table object on the server. It is a Transport type that the Gateway knows about and provides fast access to the data.
Did you use the ^VESOTCMN routine (Option 5 of the menu) to add users? This is main M routine for handling server side security and connectivity. I'm still trying to get the documentation up to date for security.
Keep in mind that the whole security interface is relatively new and has some quirks (I just struggled with one today).
Terry L. Wiechmann
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That explains it. I'm not familiar enough yet with the ESI$Table object's properties and methods to access the data yet so I'll poke around the documentation.
I've just been lucky so far - the other calls I've used that return tables put the data into the Table object that is passed in the Parameter[] array.
Richard
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, I understand where you are coming from. The EsiObjects Transport types (found in the ESI library) are all designed to implement that under the covers. The programmer simply worries about accessing the services through the objects interface. The Transport types are special in that they are understood by the Gateway and hide the complexity of transferring the actual contents. They are designed to provide for fast bulk transfer of data (often referred to as Bulk Transfer Objects - BTO) between the server and the client. In fact, they are the recommended way of transferring data between the server and a client. The current GUI uses them exclusively.
Terry L. Wiechmann
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What object pointer is used for user information, and how do I obtain the object pointer for the GetUserInfo call? Here's the call in the Java Gateway.
Variant var_UserTableResult = DefaultGateway.invoke(UserTableOID,"GetUserInfo",0,Parameters);
I need to lookup the Object ID for the object but don't see anywhere it's documented. Couldn't find it in the ESIObjects client sourcecode either.
I know it's there somewhere . . . :-)
Richard Schilling
$Environment ($Env) contains a pointer to the current server session object. $Env.Security::UserManager will return a UserManager object that GetUserInfo can be invoked on. It returns an ESI$Table object loaded with user information.
Hope I got that right.
Terry L. Wiechmann
Thanks again - that seems to have gotten me a step further, but I don't understand exactly what the server sends back. I was expecting my Table object (which is the first elements of array Parameters in the second invoke call below). What I see on the wire is the server sending back the following:
N%objcf(4,49,1)
I'm not sure what to do with that - sorry, I know it's an "ESI rookie" type of question.
Here's what I have for code:
// var_EnvironmentString is the Variant returned by the lookupObject call for $ENV.
var_UserManagerOID = DefaultGateway.invoke(var_EnvironmentString.getString(), "Security::UserManager",0,null);
// Parameters[0] is filled like this: Parameters[0] = new Parameter(new Variant(UserTable)); where UserTable is a Table object.
Variant var_UserTableResult = DefaultGateway.invoke(var_UserManagerOID.getString(), "GetUserInfo",0,Parameters);
// UserTable is not filled with anything at the completion of the call.
Richard
The N%objcf(4,49,1) is the OID of the ESI$Table object on the server. It is a Transport type that the Gateway knows about and provides fast access to the data.
Did you use the ^VESOTCMN routine (Option 5 of the menu) to add users? This is main M routine for handling server side security and connectivity. I'm still trying to get the documentation up to date for security.
Keep in mind that the whole security interface is relatively new and has some quirks (I just struggled with one today).
Terry L. Wiechmann
That explains it. I'm not familiar enough yet with the ESI$Table object's properties and methods to access the data yet so I'll poke around the documentation.
I've just been lucky so far - the other calls I've used that return tables put the data into the Table object that is passed in the Parameter[] array.
Richard
Yes, I understand where you are coming from. The EsiObjects Transport types (found in the ESI library) are all designed to implement that under the covers. The programmer simply worries about accessing the services through the objects interface. The Transport types are special in that they are understood by the Gateway and hide the complexity of transferring the actual contents. They are designed to provide for fast bulk transfer of data (often referred to as Bulk Transfer Objects - BTO) between the server and the client. In fact, they are the recommended way of transferring data between the server and a client. The current GUI uses them exclusively.
Terry L. Wiechmann
PS: I'm sure you know this but the BTO objects are covered in the Java Gateway Programmers Reference Guide.
One of our goals is to move them into the Base library at some point.
Terry L. Wiechmann