Instantiating pseudocomponents from PowerBuilder

To instantiate pseudocomponents in PowerScript, use the String_To_Object method in the JaguarORB object, specifying the pseudocomponent URL as the string to resolve. For example, the following code can be called in a PowerBuilder component to retrieve a proxy for the CtsSecurity/SessionInfo built-in pseudocomponent:

// PowerBuilder objects
JaguarORB my_JaguarORB
CORBAObject my_corbaobj

// Proxy object for CtsSecurity::SessionInfo built in
// pseudocomponent
SessionInfo my_sessioninfo

long ll_return
my_JaguarORB = CREATE JaguarORB

// Initialize the ORB
ll_return = my_JaguarORB.init("")

// Convert a URL string to an object reference
ll_return = my_JaguarORB.String_To_Object &
    ("pseudo://cpp/libjdispatch/CtsSecurity/SessionInfo", &
    my_corbaobj)

// Narrow the object reference to the Manager interface
ll_return = my_corbaobj._narrow(my_sessioninfo, "CtsSecurity/SessionInfo")

For more information on using the JaguarORB object, see the Application Techniques manual in the PowerBuilder documentation. For information on the CtsSecurity/SessionInfo API, see the generated HTML documentation, available in the html/ir subdirectory of your EAServer installation.