Beispiel #1
0
        public void login_with_password(string username, string password, string version, string originator)
        {
            try
            {
                if (JsonRpcClient != null)
                {
                    opaque_ref = JsonRpcClient.session_login_with_password(username, password, version, originator);
                }
                else
                {
                    opaque_ref = XmlRpcProxy.session_login_with_password(username, password, version, originator).parse();
                }

                SetupSessionDetails();
            }
            catch (Failure exn)
            {
                if (exn.ErrorDescription[0] == Failure.MESSAGE_PARAMETER_COUNT_MISMATCH)
                {
                    // Call the pre-2.0 version instead.
                    login_with_password(username, password, version);
                }
                else
                {
                    throw;
                }
            }
        }
Beispiel #2
0
        public void login_with_password(string username, string password)
        {
            if (JsonRpcClient != null)
            {
                opaque_ref = JsonRpcClient.session_login_with_password(username, password);
            }
            else
            {
                opaque_ref = XmlRpcProxy.session_login_with_password(username, password).parse();
            }

            SetupSessionDetails();
        }