发新话题
打印

[技术分享] delphi调用Microsoft webservice解决webservice上Session的问题

delphi调用Microsoft webservice解决webservice上Session的问题

用Microsoft C#编写了一个WebService,提供了一个方法,内容如下:
public class Data_In_Out : System.Web.Services.WebService
{
public Data_In_Out()
{
//如果使用设计的组件,请取消注释以下行
//InitializeComponent(); }
[WebMethod(EnableSession = true)]
public Incept_Info Set_Data(In_Data_Cls[] set_data, string tbl_id, string IDN_Num, string Visit_Times)
{}
}
现在在客户端我用C#程序编写了一个测试程序,内容如下
localhost.Data_In_Out dio = new WindowsApplication2.localhost.Data_In_Out();dio.CookieContainer = new System.Net.CookieContainer();
大家注意"dio.CookieContainer = new System.Net.CookieContainer();"这句话,这样就可以在WebService上调用Session传值了。现在的问题是,客户端改用Delphi7编写了,在客户端怎么实现诸如C#编写的客户端的“dio.CookieContainer = new System.Net.CookieContainer();”这类问题

TOP

发新话题