Example #1
0
    /// <summary>
    /// Build successful authentication response
    /// </summary>
    /// <param name="xmlNode"></param>
    /// <returns></returns>
    private authresponse GetSuccessResponse(XmlNode xmlNode)
    {
        MemberService.authresponse authResponse = new MemberService.authresponse();
        authResponse.success               = true;
        authResponse.errormessage          = string.Empty;
        authResponse.firstname             = xmlNode.SelectSingleNode("firstname").InnerText;
        authResponse.lastname              = xmlNode.SelectSingleNode("lastname").InnerText;
        authResponse.middlename            = xmlNode.SelectSingleNode("middlename").InnerText;
        authResponse.suffix                = xmlNode.SelectSingleNode("suffix").InnerText;
        authResponse.jobtitle              = xmlNode.SelectSingleNode("jobtitle").InnerText;
        authResponse.company               = xmlNode.SelectSingleNode("company").InnerText;
        authResponse.address1              = xmlNode.SelectSingleNode("address1").InnerText;
        authResponse.address2              = xmlNode.SelectSingleNode("address2").InnerText;
        authResponse.city                  = xmlNode.SelectSingleNode("city").InnerText;
        authResponse.state                 = xmlNode.SelectSingleNode("state").InnerText;
        authResponse.postalcode            = xmlNode.SelectSingleNode("postalcode").InnerText;
        authResponse.workphone             = xmlNode.SelectSingleNode("workphone").InnerText;
        authResponse.homephone             = xmlNode.SelectSingleNode("homephone").InnerText;
        authResponse.country               = xmlNode.SelectSingleNode("country").InnerText;
        authResponse.extension             = xmlNode.SelectSingleNode("extension").InnerText;
        authResponse.fax                   = xmlNode.SelectSingleNode("fax").InnerText;
        authResponse.mobilephone           = xmlNode.SelectSingleNode("mobilephone").InnerText;
        authResponse.emergencycontactphone = xmlNode.SelectSingleNode("emergencycontactphone").InnerText;
        authResponse.dob                   = xmlNode.SelectSingleNode("dob").InnerText;
        authResponse.gender                = xmlNode.SelectSingleNode("gender").InnerText;
        authResponse.secondaryemail        = xmlNode.SelectSingleNode("secondaryemail").InnerText;

        return(authResponse);
    }
Example #2
0
    /// <summary>
    /// Build unsuccessful authentication response
    /// </summary>
    private authresponse GetErrorResponse(string errorMessage)
    {
        MemberService.authresponse authresponse = new MemberService.authresponse();
        authresponse.success      = false;
        authresponse.errormessage = errorMessage;

        return(authresponse);
    }
Example #3
0
    /// <summary>
    /// Build successful authentication response
    /// </summary>
    /// <param name="xmlNode"></param>
    /// <returns></returns>
    private authresponse GetSuccessResponse(XmlNode xmlNode)
    {
        MemberService.authresponse authResponse = new MemberService.authresponse();
        authResponse.success = true;
        authResponse.errormessage = string.Empty;
        authResponse.firstname = xmlNode.SelectSingleNode("firstname").InnerText;
        authResponse.lastname = xmlNode.SelectSingleNode("lastname").InnerText;
        authResponse.middlename = xmlNode.SelectSingleNode("middlename").InnerText;
        authResponse.suffix = xmlNode.SelectSingleNode("suffix").InnerText;
        authResponse.jobtitle = xmlNode.SelectSingleNode("jobtitle").InnerText;
        authResponse.company = xmlNode.SelectSingleNode("company").InnerText;
        authResponse.address1 = xmlNode.SelectSingleNode("address1").InnerText;
        authResponse.address2 = xmlNode.SelectSingleNode("address2").InnerText;
        authResponse.city = xmlNode.SelectSingleNode("city").InnerText;
        authResponse.state = xmlNode.SelectSingleNode("state").InnerText;
        authResponse.postalcode = xmlNode.SelectSingleNode("postalcode").InnerText;
        authResponse.workphone = xmlNode.SelectSingleNode("workphone").InnerText;
        authResponse.homephone = xmlNode.SelectSingleNode("homephone").InnerText;
        authResponse.country = xmlNode.SelectSingleNode("country").InnerText;
        authResponse.extension = xmlNode.SelectSingleNode("extension").InnerText;
        authResponse.fax = xmlNode.SelectSingleNode("fax").InnerText;
        authResponse.mobilephone = xmlNode.SelectSingleNode("mobilephone").InnerText;
        authResponse.emergencycontactphone = xmlNode.SelectSingleNode("emergencycontactphone").InnerText;
        authResponse.dob = xmlNode.SelectSingleNode("dob").InnerText;
        authResponse.gender = xmlNode.SelectSingleNode("gender").InnerText;
        authResponse.secondaryemail = xmlNode.SelectSingleNode("secondaryemail").InnerText;

        return authResponse;
    }
Example #4
0
    /// <summary>
    /// Build unsuccessful authentication response
    /// </summary>
    private authresponse GetErrorResponse(string errorMessage)
    {
        MemberService.authresponse authresponse = new MemberService.authresponse();
        authresponse.success = false;
        authresponse.errormessage = errorMessage;

        return authresponse;
    }