各位大侠,小弟先行在此谢过,因为头一次做.net,浪费的时间比较多,眼看快来不及了还有个悬案没有解决。。ASP.NET(C#)里
在某客户端打开页面点击按钮,将 A系统 的XML文件传送到 B系统。用soap也好,用HttpContext的Request.InputStream也好。
哪位有实例的可以让小弟参考一下么,如果能写个大概的样子就更好了。急,多谢!

解决方案 »

  1.   

    Request.InputStream你把收到的数据转换为文本,你就会发现这个文本就是对方提交过来的XML的内容
      

  2.   

    是否可以先将A系统要传输的XML文件放到一个文件夹里,然后让B系统去访问这个文件夹里的XML呢
      

  3.   

    Form表单c#里面的WebClient  HttpWebRequest和HttpWebResponse XmlHttpClass 等
      

  4.   

    1 WEB页面可以采用AJAX的方式将一个XML字符串发送给另一页面,但现在AJAX不能跨域
    2 C#里面就有很多了。 WebClient  HttpWebRequest和HttpWebResponse  比较常用
      

  5.   


    不行吧,不能共享的,不能用ftp
      

  6.   

    那把XML的内容写入数据库呢?还是想知道处理逻辑,B系统只是要能得到这些XML内容就可以了吧
      

  7.   

    你可以直接使用发送xml
    做法:   
      winform:   
        
      string   postData   =   "a="   +   textBox1.Text;   
      Encoding   encoding   =   Encoding.UTF8;   
      byte[]   data   =   encoding.GetBytes(postData);   
      System.Net.HttpWebRequest   req   =   (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create("http://localhost:8801/A.aspx");   
      req.Method   =   "POST";   
      req.ContentType   =   "application/x-www-form-urlencoded";   
      req.ContentLength   =   data.Length;   
      System.IO.Stream   newStream   =   req.GetRequestStream();   
      //   发送数据   
      newStream.Write(data,   0,   data.Length);               
      System.Net.HttpWebResponse   res   =   (System.Net.HttpWebResponse)req.GetResponse();   
      MessageBox.Show(res.StatusDescription.ToString());   
      newStream.Close();   
        
        
        
      a.aspx   
      ============   
      <%@   Page   Language="C#"   AutoEventWireup="true"   CodeFile="A.aspx.cs"   Inherits="A"   ValidateRequest="false"   %>   
        
      a.aspx.cs   
      ============   
        protected   void   Page_Load(   object   sender,   EventArgs   e   )   
          {   
              System.IO.StreamWriter   sw   =   new   System.IO.StreamWriter(Server.MapPath("a.txt"),true,System.Text.Encoding.UTF8);   
              sw.Write(Request.Form["a"]);   
              sw.Close();   
          }
      

  8.   

    那个。。美女,winform是在什么地方被调用的?