ISilentSessionLogin Interface

The SilentSessionLogin component is very similar to the StdSessionLogin component in that it maintains vital state information required for establishing a login session with FileNet Workplace, such as the Workplace Server URL, user credentials and the login tokens used to authenticate, establish and maintain a "session" with a Workplace Server. However, the SilentSessionLogin component differs from the StdSessionLogin component in the following ways:

The client application must instantiate the SilentSessionLogin component and initialize it with the user name and password login credentials, as well as a pointer to an IBaseServerURL interface that contains information about the server, port number, client application, and HTTP security. However, the client never directly invokes a login or logout operation through the ISilentSessionLogin interface. Instead, the client passes the ISilentSessionLogin interface pointer to the IAppIntSession::Initialize method of the AppIntSession component, which will cause the login and logout operations to be invoked as they are required during command execution.

COM Class ID

coclass SilentSessionLogin {
[default] interface ISilentSessionLogin;
};

Reference

DLL FnAppIntSessionLogin.dll
See Also IBaseServerURL, IStdSessionLogin and IAppIntSession Interfaces

Methods

The ISilentSessionLogin interface defines one method:

Method Description
InitializeWithCredentials Initializes the client application's SilentSessionLogin component for the login session to FileNet Workplace, including specifying the user name and password login credentials, and providing a pointer to an IBaseServerURL interface containing information about the Application Engine server, port number, client application, and the security of HTTP during the session.

Example

In the application's StdAfx.h header file:

#import"C:\Program Files\FileNet\AppInt\FnAppIntCmd.tlb"                      named_guids no_namespace
#import "C:\Program Files\FileNet\AppInt\FnAppIntHttpRequest.dll"              named_guids no_namespace
#import "C:\Program Files\FileNet\AppInt\FnAppIntBrowserDlg.dll"               named_guids no_namespace
#import "C:\Program Files\FileNet\AppInt\FnAppIntHttpConnection.dll"           named_guids no_namespace
#import "C:\Program Files\FileNet\AppInt\FnAppIntResources.dll"                named_guids no_namespace
#import "C:\Program Files\FileNet\AppInt\FnAppIntClientRecordBase.tlb"         named_guids no_namespace
#import "C:\Program Files\FileNet\AppInt\FnAppIntClientStore.dll"              named_guids no_namespace
#import "C:\Program Files\FileNet\AppInt\FnAppIntSession.dll"                  named_guids no_namespace
#import "C:\Program Files\FileNet\AppInt\FnAppIntSessionLogin.dll"             named_guids no_namespace

In the application's primary .cpp source file:

// Instantiate a BaseServerUrl Component
IBaseServerUrlPtr spIBaseServerURL;
HRESULT hResult = spIBaseServerURL.CreateInstance(__uuidof(BaseServerUrl));
if (FAILED(hResult)) { std::cout << "Could not create the BaseServerURL component." << std::endl; _ASSERTE(0); }
try {
// Initialize the BaseServerURL // with the Application Engine server name, port number, // client application name, and indicate if secure HTTP.
_bstr_t serverName(_T("eraser"));
_bstr_t portNumber(_T("8080"));
_bstr_t applicationName(_T("Workplace"));
VARIANT_BOOL bIsSecure = VARIANT_FALSE; std::cout << "Initializing the BaseServerURL component..." << std::endl;
spIBaseServerURL->Initialize(serverName, portNumber, applicationName, bIsSecure);
... } catch( ... ) { }
// Instantiate the SilentSessionLogin component ISilentSessionLoginPtr spISilentSessionLogin; HRESULT hResult = spISilentSessionLogin.CreateInstance(__uuidof(SilentSessionLogin)); if (FAILED(hResult)) { std::cout << "Could not create the SilentSessionLogin component." << std::endl; _ASSERTE(0); } try {
// Initialize the SilentSessionLogin component // with the user name and password login credentials // and the pointer to thee BaseServerURL component _bstr_t userName(_T("John Doe")); _bstr_t userPassword(_T("guest")); std::cout << "Initializing the SilentSessionLogin component..." << std::endl; spISilentSessionLogin->InitializeWithCredentials(userName, userPassword, spIBaseServerURL); ... } catch( ... ) { } ...