System.Web.Services Namespace

System.Web.Services命名空间包含使您可以利用 ASP.NET 和 XML Web 服务客户端来创建 XML Web 服务的类。 The System.Web.Services namespace consists of the classes that enable you to create XML Web services using ASP.NET and XML Web service clients. XML Web services 是一些应用程序,它们提供了在使用标准协议(如 HTTP、XML、XSD、SOAP 和 WSDL)的松耦合环境下进行消息交换的能力。 XML Web services are applications that provide the ability to exchange messages in a loosely coupled environment using standard protocols such as HTTP, XML, XSD, SOAP, and WSDL. 利用 XML Web services,可以在异质环境下的公司内部和公司之间生成模块化应用程序,使它们与各种各样的实现、平台和设备交互操作。 XML Web services enable the building of modular applications within and across companies in heterogeneous environments making them interoperable with a broad variety of implementations, platforms and devices. 这些应用程序的基于 SOAP 的 XML 消息可以具有定义完善的部分(结构化和类型化的部分)或者定义比较松散的部分(使用任意 XML)。 The SOAP-based XML messages of these applications can have well-defined (structured and typed), or loosely defined parts (using arbitrary XML). 消息可以随时间发展而不破坏协议的能力对于作为未来的 Web 构造块的 XML Web services 的灵活性和可靠性来说是非常重要的。 The ability of the messages to evolve over time without breaking the protocol is fundamental to the flexibility and robustness of XML Web services as a building block for the future of the Web.

WebMethodAttribute

向使用 ASP.NET 创建的 XML Web service 中的某个方法添加此特性后,就可以从远程 Web 客户端调用该方法。Adding this attribute to a method within an XML Web service created using ASP.NET makes the method callable from remote Web clients. 此类不能被继承。This class cannot be inherited.

WebService

为 XML Web services 定义可选的基类,该基类提供对公共 ASP.NET 对象(如应用程序和会话状态)的直接访问。Defines the optional base class for XML Web services, which provides direct access to common ASP.NET objects, such as application and session state.

WebServiceAttribute

用于向 XML Web services 添加附加信息,如描述其功能的字符串。Used to add additional information to an XML Web service, such as a string describing its functionality.

WebServiceBindingAttribute

声明用于定义一个或多个 XML Web service 方法的绑定。Declares a binding that defines one or more XML Web service methods. 此类不能被继承。This class cannot be inherited.

枚举

TransactionOption
WsiProfiles

描述 Web 服务声称所符合的 Web 服务互操作性 (WSI) 规范。Describes the Web services interoperability (WSI) specification to which a Web service claims to conform.

注解

若要开始使用 ASP.NET 创建 XML Web 服务,请查看WebService类,可以从派生的 XML Web 服务有权访问的 ASP.NET 内部函数和WebMethodAttribute类,必须在要以编程方式的任何方法放置在 Web 上公开。To get started creating XML Web services using ASP.NET, look at the WebService class, which XML Web services can derive from to get access to the ASP.NET intrinsics and the WebMethodAttribute class, which must be placed on any method that you want to programmatically expose over the Web.