/// <summary> /// This method will try to create a SessionObject, by connecting to the XPages database Rest Service /// <para>In order to get the SessionObject, the user needs to have access to the XPages database</para> /// </summary> /// <param name="DominoWebServiceURL"></param> /// <returns>SessionObject</returns> public SessionObject GetSession(string DominoWebServiceURL) { ResetReturn(); // reset the error vars - will be populated by SessionObject if (_isConnected) { //we have a valid Requestor if (Request != null && Request.isInitialized) { SessionObject sObj = new SessionObject(this, DominoWebServiceURL); if (sObj.Initialize()) { _SessionObject = sObj; return(sObj); //not written in initialize - just returning false } else { ReturnMessages.Add("Connector.GetSession unable to complete, unable to initialize the session object"); hasError = true; //throws exception return(null); } } else { ReturnMessages.Add("Connector.GetSession unable to complete, the request object is invalid or not initialized"); hasError = true; //throws exception return(null); } } else { ReturnMessages.Add("Connector.GetSession unable to complete, Connector is not connected to domino"); hasError = true; //throws exception return(null); } }