zoukankan      html  css  js  c++  java
  • HttpRequest访问Https带有证书并使用WSDL文档生成代理类方案(2)

    阅读全文:http://www.cckan.net/forum.php?mod=viewthread&tid=214

    上次的文章http://www.cnblogs.com/sufei/archive/2010/03/14/https.html没有具体 说完,这里再加上一点,就是把得到的结果取出来             

    代码
     //转图片的方法
            public Image Base64ToImage(string base64String)
            {
                
    byte[] imageBytes = Convert.FromBase64String(base64String);
                MemoryStream ms 
    = new MemoryStream(imageBytes, 0,
                  imageBytes.Length);
                ms.Write(imageBytes, 
    0, imageBytes.Length);
                System.Drawing.Image image 
    = System.Drawing.Image.FromStream(ms, true);

                
    return image;
            }

            
    //取返回的信息结果
            private void button4_Click(object sender, EventArgs e)
            {
                XmlDocument objXml 
    = new XmlDocument();

                
    //文件在Bin目录下
                objXml.Load(Application.StartupPath + "\\XML.xml");

                
    //身份证号
                textBox1.Text = objXml.SelectSingleNode("//gmsfhm").InnerText;

                
    //姓名
                textBox2.Text = objXml.SelectSingleNode("//xm").InnerText;

                
    //身份证号是否一样
                textBox4.Text = objXml.SelectSingleNode("//result_gmsfhm").InnerText;

                
    //姓名是否一样
                textBox3.Text = objXml.SelectSingleNode("//result_xm").InnerText;

                
    //取图片
                string bas64 = objXml.SelectSingleNode("//xp").InnerText;

                
    //显示图片
                pictureBox1.Image = Base64ToImage(bas64);


            }
  • 相关阅读:
    redis订阅发布功能
    redis基础知识
    Redis安装启动(linux系统)
    Mysql之Linux中mariadb主从复制
    nginx+vue+uwsgi+django的前后端分离项目部署
    supervisor进程管理工具
    nginx+uwsgi+django
    uwsgi模块以参数形式运行项目
    nginx之启停操作及配置文件语法检测
    nginx配置之负载均衡
  • 原文地址:https://www.cnblogs.com/sufei/p/1687447.html
Copyright © 2011-2022 走看看