转自:http://www.cnblogs.com/jdmei520/archive/2009/06/17/1505053.html
Webservice技术的出现将各种开发技术和语言完全的融合了,下面就这种融合在C#和delphi之间的交互做一次全面的体现
1.使用C#创建一个Webservice服务。
使用vs2005的模板创建C#的webservice非常容易。原文件如下:
[WebService(Namespace = "http://localhost/webserver/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
public Service () {
//如果使用设计的组件,请取消注释以下行
InitializeComponent();
}
#region Component Designer generated code
private void InitializeComponent()
{
}
//Web 服务设计器所必需的
private IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}