代码之家  ›  专栏  ›  技术社区  ›  jamone

LiveCycle PDF以XML形式提交到.NET webservice

  •  2
  • jamone  · 技术社区  · 16 年前

    [WebMethod]
    public bool RecieveXML(XmlDocument input)
    

    [WebMethod]
        public bool RecieveXML(string input)
    

    ?

    1 回复  |  直到 16 年前
        1
  •  3
  •   Giorgi    16 年前

    您需要返回fdf数据(带有适当的mime类型集),其中嵌入了javascript指令。我没有用webservice尝试过,我只使用了一个简单的aspx页面 Response.Write 返回数据。

    Submitting form to asp.net server.

    至于接收数据,我是这样做的(代码在页面加载事件中):

                if (Request.RequestType.ToUpper() == "POST")
                {
                    using (StreamReader rd = new StreamReader(Request.InputStream))
                    {
                       string response = string.Empty;
                       try
                       {
                          Process(rd.ReadToEnd());
    
                          response = GetFDF(true);
                       }
                       catch (Exception)
                       {
                          response = GetFDF(false);
                       }
    
                       Response.ContentType = "application/vnd.fdf";
                       Response.Output.Write(response);
                       Response.End();
                    }
                }
    

    XmlSerializer