Exemplo n.º 1
0
 private UserLogonResp ParseToUserLogonResp(t_user_info user)
 {
     UserLogonResp resp = new UserLogonResp()
     {
         hRet = 0,
         user_info = user,
     };
     return resp;
 }
Exemplo n.º 2
0
        private void ResponseUserLogonResp(HttpContext context, UserLogonResp response)
        {
            string userInfoXml = response.ToXml();
            XElement source = XElement.Parse(userInfoXml);
            source.Name = "body";
            
            TextReader reader = this.GetUserLogonRespDocTemplate(context);
            XDocument docElement = XDocument.Load(reader, LoadOptions.PreserveWhitespace);
            IEnumerable<XElement> userInfos = docElement.Descendants("body");

            foreach (XElement e in userInfos)
            {
                e.ReplaceNodes(source.Nodes());
                break;
            }

            StringBuilder builder = new StringBuilder();
            builder.AppendLine(docElement.Declaration.ToString());
            builder.AppendLine(docElement.ToString());
            context.Response.Write(builder.ToString());
        }
Exemplo n.º 3
-2
        public UserLogonResp RequestLogon(UserLogonReq request)
        {
            UserLogonResp response = new UserLogonResp()
            {
                hRet = 0,
                user_info = new user_info_schema()
                {
                    userId = request.loginName,
                    loginName = request.loginName
                }
            };

            return response;
        }