|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.businessobjects.dsws.Consumer
com.businessobjects.dsws.session.Session
public class Session
The Session class is a proxy that can consult the Session Web Service and that is mapped on its WSDL.
The Session class provides services such as getVersion, login, loginWithToken, logout,
changePassword, getServerInfo, setDictionary, getDictionary, resetSessionTimeOut...
Example:
URL objURLSession = new URL("http://boserver:port/dswsbobje/services/session");
Connection objConnection = new Connection(objURLSession);
Session objSession = new Session(objConnection);
EnterpriseCredential objEnterpriseCredential = new EnterpriseCredential();
objEnterpriseCredential.setLogin("John");
objEnterpriseCredential.setPassword("MyPassword1973");
objEnterpriseCredential.setDomain("MyCMS");
objEnterpriseCredential.setLocale("en_US");
objEnterpriseCredential.setTimeZone("GMT+01:00");
SessionInfo objSessionInfo = objSession.login(objEnterpriseCredential);
Connection,
ProxyParameters,
EnterpriseCredential,
SSLWrapper,
Serialized Form| Constructor Summary | |
|---|---|
Session()
|
|
Session(Connection objConnection)
Instantiate a new Session object using a Connection. |
|
Session(Connection objConnection,
ConnectionState objConnectionState)
Instantiate a new Session object using Connection and ConnectionState objects. |
|
Session(java.lang.String strImplementation)
Internal Use Only. |
|
Session(java.lang.String strImplementation,
ConnectionState objConnectionState)
Internal Use Only. |
|
| Method Summary | |
|---|---|
void |
changePassword(java.lang.String oldPassword,
java.lang.String newPassword)
Change the current user's password. |
java.lang.String[] |
getAssociatedServicesURL(java.lang.String strServiceName)
Deprecated. As of XI 4.0. |
Entry[] |
getDictionary(DictionaryType.Enum dictionary)
Return an array of Entries for the User or Server. |
static Session |
getInstance(Consumer objConsumer,
java.lang.String strURL)
|
java.lang.String |
getSAPAssertionTicket(java.lang.String targetSystemID)
For internal use only Get an assertion ticket for the currently logged on user, to the specified SAP system. |
java.lang.String |
getSecondaryCredential(java.lang.String credentialKey)
|
ServerInfo |
getServerInfo()
Return information about the server being accessed by the Web Services. |
ServerInfoDetails |
getServerInfoDetails()
Return information about the server being accessed by the Web Services. |
SessionInfo |
getSessionInfo()
Returns the information pertaining to a user's session. |
SupportedPVLs |
getSupportedPVLs()
|
java.lang.String |
getVersion()
Returns a string containing the version of Web Services being used.The format of the string returned that indicates the version number is as follows: |
SessionInfo |
login(Credential credential)
Open a Web Services session by providing full Enterprise Credentials. |
SessionInfo |
loginWithSerializedSession(java.lang.String serializedSession,
LoginOption option)
Open a Web Services session by providing a login serialized session. |
SessionInfo |
loginWithSerializedSession(java.lang.String serializedSession,
java.lang.String locale,
java.lang.String timezone,
java.lang.String reportedIPAddress,
java.lang.String reportedHostName)
|
SessionInfo |
loginWithToken(java.lang.String token,
LoginOption option)
Open a Web Services session by providing a login token. |
SessionInfo |
loginWithToken(java.lang.String token,
java.lang.String locale,
java.lang.String timezone)
Open a Web Services session by providing a login token. |
SessionInfo |
loginWithToken(java.lang.String token,
java.lang.String locale,
java.lang.String timezone,
java.lang.String reportedIPAddress,
java.lang.String reportedHostName)
Open a Web Services session by providing a login token. |
void |
logout()
Log out of a Web Services session. |
void |
readExternal(java.io.ObjectInput in)
|
void |
removeSecondaryCredential(java.lang.String credentialKey)
|
void |
resetSessionTimeOut()
Notifies the web service provider to keep the web service session alive. |
void |
setDictionary(DictionaryType.Enum dictionary,
Entry[] entries)
The SetDictionary method sets an array of Entries for the User or Server. |
void |
setPVLocale(java.lang.String pvl)
|
void |
setSecondaryCredential(java.lang.String credentialKey,
java.lang.String credentialValue)
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class com.businessobjects.dsws.Consumer |
|---|
displayException, GetAxisFaultDetails, getConnection, getConnection, getConnectionState, getConsumer, getConsumer |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Session(java.lang.String strImplementation)
throws AxisFault
Internal Use Only.
AxisFault
public Session(java.lang.String strImplementation,
ConnectionState objConnectionState)
throws AxisFault
Internal Use Only.
AxisFault
public Session(Connection objConnection)
throws AxisFault
Example: Initializing a Session instance.
Connection objConnection = new Connection(new URL("http://boserver:port/dswsbobje/services/session"));
Session objSession = new Session(objConnection);
AxisFaultConnection
public Session(Connection objConnection,
ConnectionState objConnectionState)
throws AxisFault
Example: Initializing a Session instance.
URL objURLSession = new URL("http://boserver:port/dswsbobje/services/session");
Connection objConnection = new Connection(objURLSession);
Session objSession = new Session(objConnection);
EnterpriseCredential objEnterpriseCredential = new EnterpriseCredential();
objEnterpriseCredential.setLogin("John");
objEnterpriseCredential.setPassword("MyPassword1973");
objEnterpriseCredential.setDomain("MyCMS");
objEnterpriseCredential.setLocale("en_US");
objEnterpriseCredential.setTimeZone("GMT+01:00");
SessionInfo objSessionInfo = objSession.login(objEnterpriseCredential);
// To be able to reconnect to the server session, you only need to keep the session id
String strSessionID = objSession.getConnectionState().getSessionID();
// Later on, if the session is still alive, you can connect to the same session just thanks to the session id
URL objURLSession = new URL("http://boserver:port/dswsbobje/services/session");
Connection objConnection = new Connection(objURLSession);
ConnectionState objConnectionState = new ConnectionState(strSessionID);
Session objSession = new Session(objConnection, objConnectionState);
objSession.resetSessionTimeOut();
objConnection - a valid Connection object with the URL set to the Session service.objConnectionState - the ConnectionState of the current user session.
AxisFaultConnection,
ConnectionStatepublic Session()
| Method Detail |
|---|
public java.lang.String[] getAssociatedServicesURL(java.lang.String strServiceName)
Example: Initializing a Session instance.
Connection objConnection = new Connection(new URL("http://boserver:port/dswsbobje/services/session"));
Session objSession = new Session(objConnection);
EnterpriseCredential objEnterpriseCredential = new EnterpriseCredential();
objEnterpriseCredential.setLogin("John");
objEnterpriseCredential.setPassword("MyPassword1973");
objEnterpriseCredential.setDomain("MyCMS");
objEnterpriseCredential.setLocale("en_US");
objEnterpriseCredential.setTimeZone("GMT+01:00");
SessionInfo objSessionInfo = objSession.login(objEnterpriseCredential);
String[] astrURLs = objSession.getAssociatedServicesURL("ReportEngine");
// If no URL is returned, the service is not available
if (astrURLs.length > 0)
{
ReportEngine objReportEngine = ReportEngine.getInstance(objSession, astrURLs[0]);
}
Note:If the user is not logged in or the service name is unknown,
NULL will be returned.
strServiceName - A string containing the name of the desired service. For example "BICatalog"
public static Session getInstance(Consumer objConsumer,
java.lang.String strURL)
throws AxisFault
objConsumer - one of the current user's consumer objects.strURL - URL to connect to the Session web service.
DSWSException - Exception raised either as a Web Service SOAP Fault or as a Consumer side trapped exception.
Example: Retrieving a Session instance from a BICatalog instance.
...
Session objSession = Session.GetInstance(objBICatalog, "http://boserver:port/dswsbobje/services/session");
objSession.resetTimeout();
AxisFaultConnection,
Consumer,
ConnectionState,
com.businessobjects.dsws.session.Session.Login
public java.lang.String getVersion()
throws AxisFault
. For example, in BusinessObjects Web Services 3.1, the getVersion method would return 12.0.
AxisFault - Example:
Connection objConnection = new Connection(new URL("http://boserver:port/dswsbobje/services/session"));
Session objSession = new Session(objConnection);
String strVersion = objSession.getVersion();
public SessionInfo login(Credential credential)
throws AxisFault
Example:
URL objURLSession = new URL("http://boserver:port/dswsbobje/services/session");
Connection objConnection = new Connection(objURLSession);
Session objSession = new Session(objConnection);
EnterpriseCredential objEnterpriseCredential = new EnterpriseCredential();
objEnterpriseCredential.setLogin("John");
objEnterpriseCredential.setPassword("MyPassword1973");
objEnterpriseCredential.setDomain("MyCMS");
objEnterpriseCredential.setLocale("en_US");
objEnterpriseCredential.setTimeZone("GMT+01:00");
SessionInfo objSessionInfo = objSession.login(objEnterpriseCredential);
credential - EnterpriseCredential containing user login information.
DSWSException
AxisFaultConnection,
ProxyParameters,
EnterpriseCredential,
SSLWrapper,
SessionInfo,
EnterpriseCredential
public SessionInfo loginWithToken(java.lang.String token,
LoginOption option)
throws AxisFault
Example:
URL objURLSession = new URL("http://boserver:port/dswsbobje/services/session");
Connection objConnection = new Connection(objURLSession);
Session objSession = new Session(objConnection);
// The token value is returned from a previous successful login. See SessionInfo.getDefaultToken()
// String strToken;
LoginOption option=LoginOption.Factory.newInstance();
option.setLocale("en_CA");
option.setTimeZone("GMT-08:00");
option.setReportedIPAddress("192.165.218.18");
option.setReportedHostName("full_machine_name");
option.setPolicyID("BOE XI 4.0");
LoginOption option=LoginOption.Factory.newInstance();
SessionInfo objSessionInfo = objSession.loginWithToken(strToken, option);
a - String token containing the login token retrieved from a previous login.a - LoginOption object containing different options.
AxisFaultConnection,
ProxyParameters,
SSLWrapper,
SessionInfo
public SessionInfo loginWithToken(java.lang.String token,
java.lang.String locale,
java.lang.String timezone)
throws AxisFault
Example:
URL objURLSession = new URL("http://boserver:port/dswsbobje/services/session");
Connection objConnection = new Connection(objURLSession);
Session objSession = new Session(objConnection);
// The token value is returned from a previous successful login. See SessionInfo.getDefaultToken()
// String strToken;
String strLocale = "fr_CA";
String strTimezone = "GMT-08:00";
SessionInfo objSessionInfo = objSession.loginWithToken(strToken, strLocale, strTimezone);
a - String token containing the login token retrieved from a previous login.a - String locale representing the current locale.a - String timezone representing the current timezone.
AxisFaultConnection,
ProxyParameters,
SSLWrapper,
SessionInfo
public SessionInfo loginWithToken(java.lang.String token,
java.lang.String locale,
java.lang.String timezone,
java.lang.String reportedIPAddress,
java.lang.String reportedHostName)
throws AxisFault
Example:
URL objURLSession = new URL("http://boserver:port/dswsbobje/services/session");
Connection objConnection = new Connection(objURLSession);
Session objSession = new Session(objConnection);
// The token value is returned from a previous successful login. See SessionInfo.getDefaultToken()
// String strToken;
String strLocale = "fr_CA";
String strTimezone = "GMT-08:00";
SessionInfo objSessionInfo = objSession.loginWithToken(strToken, strLocale, strTimezone);
a - String token containing the login token retrieved from a previous login.a - String locale representing the current locale.a - String timezone representing the current timezone.reported - IP Addressreported - Host Name
AxisFaultConnection,
ProxyParameters,
SSLWrapper,
SessionInfo
public SessionInfo loginWithSerializedSession(java.lang.String serializedSession,
LoginOption option)
throws AxisFault
Example:
URL objURLSession = new URL("http://boserver:port/dswsbobje/services/session");
Connection objConnection = new Connection(objURLSession);
Session objSession = new Session(objConnection);
// The token value is returned from a previous successful login. See SessionInfo.getDefaultToken()
// String serializedSession;
LoginOption option=LoginOption.Factory.newInstance();
option.setLocale("en_CA");
option.setTimeZone("GMT-08:00");
option.setReportedIPAddress("192.165.218.18");
option.setReportedHostName("full_machine_name");
option.setPolicyID("BOE XI 4.0");
SessionInfo objSessionInfo = objSession.loginWithSerializedSession(serializedSession, option);
a - String serializedSession containing the login serialized session retrieved from a previous login.a - LoginOption object containing different options.
AxisFaultConnection,
ProxyParameters,
SSLWrapper,
SessionInfo
public SessionInfo loginWithSerializedSession(java.lang.String serializedSession,
java.lang.String locale,
java.lang.String timezone,
java.lang.String reportedIPAddress,
java.lang.String reportedHostName)
throws AxisFault
AxisFault
public void logout()
throws AxisFault
DSWSException
AxisFault
public void resetSessionTimeOut()
throws AxisFault
Note:
Most web service operations will reset the period of inactivity of a web service session. This includes operations for web services such as Session, BIPlatform, and ReportEngine except
Session.getVersion.
DSWSException
AxisFault
public ServerInfo getServerInfo()
throws AxisFault
DSWSException
AxisFaultServerInfo,
EnterpriseCredential.getAuthType()
public ServerInfoDetails getServerInfoDetails()
throws AxisFault
DSWSException
AxisFaultServerInfoDetails,
EnterpriseCredential.getAuthType()
public void setDictionary(DictionaryType.Enum dictionary,
Entry[] entries)
throws AxisFault
dictionary - The DictionaryType to be set. Either DictionaryType.USER or
DictionaryType.SERVER.entries - an Array of Entries to be stored in the dictionary.
DSWSException
AxisFaultEntry,
DictionaryType
public Entry[] getDictionary(DictionaryType.Enum dictionary)
throws AxisFault
dictionary - The DictionaryType to be retrueved. Either DictionaryType.USER
or DictionaryType.SERVER.
DSWSException
AxisFaultEntry,
DictionaryType
public void changePassword(java.lang.String oldPassword,
java.lang.String newPassword)
throws AxisFault
oldPassword - a string containing the user's current password.newPassword - a string containing the user's new password.
DSWSException
AxisFault
public SessionInfo getSessionInfo()
throws AxisFault
login method.
Session object must have a valid session ID string, either from a
successful login or from being constructed with a valid ConnectionState.
SessionInfo object containing the relevant information associated with a user's session
DSWSException - If the session ID associated with this Session object
is no longer valid.
AxisFault
public void setPVLocale(java.lang.String pvl)
throws AxisFault
AxisFault
public SupportedPVLs getSupportedPVLs()
throws AxisFault
AxisFault
public void setSecondaryCredential(java.lang.String credentialKey,
java.lang.String credentialValue)
throws AxisFault
AxisFault
public java.lang.String getSecondaryCredential(java.lang.String credentialKey)
throws AxisFault
AxisFault
public void removeSecondaryCredential(java.lang.String credentialKey)
throws AxisFault
AxisFault
public java.lang.String getSAPAssertionTicket(java.lang.String targetSystemID)
throws AxisFault
targetSystemID -
AxisFault
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||