ProtocolReflector 类

定义

提供各种通信协议的公共功能,以从标识为 Web 服务的类创建 ServiceDescription 对象。Provides common functionality across communication protocols for creating ServiceDescription objects from classes that are identified as Web services.

public ref class ProtocolReflector abstract
public abstract class ProtocolReflector
type ProtocolReflector = class
Public MustInherit Class ProtocolReflector
继承
ProtocolReflector

注解

抽象 ProtocolReflector 类及其具体派生类 ServiceDescription 从用特性标识为 Web 服务的类创建对象 WebServiceAttributeThe abstract ProtocolReflector class and its concrete derived classes create ServiceDescription objects from classes that are identified as Web services with the WebServiceAttribute attribute. 每个具体 ProtocolReflector 派生类都会 ServiceDescription 根据指定的通信协议生成对象; ProtocolReflector 无论使用哪种协议,都提供通用功能。Each concrete ProtocolReflector-derived class generates ServiceDescription objects according to a specified communication protocol; ProtocolReflector provides common functionality regardless of the protocol.

输出 ServiceDescription 实例可用于使用 Write 方法或可用重载之一生成 Web 服务描述语言(WSDL)文档。An output ServiceDescription instance can be used to generate a Web Services Description Language (WSDL) document with the Write method or one of the available overloads. ServiceDescription类和相关类也可以使用该实例 ServiceDescriptionImporter 来生成客户端代理代码或抽象服务器代码。The ServiceDescription instance can also be used by the ServiceDescriptionImporter class and related classes to generate client proxy code or abstract server code.

ProtocolReflector类使用 WebServiceBindingAttributeServiceDescription 它在 Web 服务类中标识的每个绑定创建一个。The ProtocolReflector class uses the WebServiceBindingAttribute to create a ServiceDescription for each binding it identifies in the Web service class. 如果该属性不存在,则 ProtocolReflector 该类将为整个类创建一个绑定。If that attribute is not present, the ProtocolReflector class creates a single binding for the entire class. 对于属于绑定的每个 Web 服务方法(显示有的 Web 服务类中的方法 WebMethodAttribute ),派生自的类 ProtocolReflector 生成操作以及添加到对象的关联消息 ServiceDescriptionFor each Web service method (a method in the Web service class appearing with the WebMethodAttribute) belonging to a binding, a class derived from ProtocolReflector generates an operation and associated messages that are added to the ServiceDescription object.

通常,开发人员通过类间接使用这些类 ServiceDescriptionReflector ,而不是直接调用派生自的类 ProtocolReflectorTypically, a developer uses these classes indirectly through the ServiceDescriptionReflector class, instead of directly invoking classes derived from ProtocolReflector.

构造函数

ProtocolReflector()

初始化 ProtocolReflector 类的新实例。Initializes a new instance of the ProtocolReflector class.

属性

Binding

获取当前正在生成并添加到关联的 ServiceDescription 中的 Web 服务描述语言 (WSDL) 绑定。Gets the Web Services Description Language (WSDL) binding currently being generated and added to the associated ServiceDescription.

DefaultNamespace

获取默认的命名空间,该命名空间由关联的 ServiceDescription 对象的 Namespace 属性来标识。Gets the default namespace, as identified by the associated ServiceDescription object's Namespace property.

HeaderMessages

获取要添加到关联的 ServiceDescription 对象中的 SOAP 标头消息定义。Gets SOAP header message definitions to be added to the associated ServiceDescription object.

InputMessage

获取抽象操作(协议反射器当前正在通过 Web 服务方法生成)的 Web 服务描述语言 (WSDL) 输入消息。Gets the Web Services Description Language (WSDL) input message for the abstract operation that the protocol reflector is currently generating from a Web service method.

Method

获取协议反射器当前正在处理的 Web 服务方法,它生成放置于生成的 ServiceDescription 中的 Web 服务描述语言 (WSDL) 操作。Gets the Web service method that the protocol reflector is currently processing to generate a Web Services Description Language (WSDL) operation to be placed in the generated ServiceDescription.

MethodAttribute

获取协议反射器当前正在处理的方法的 WebMethodAttribute,处理此方法的目的在于生成要置于生成的 ServiceDescription 中的 Web 服务描述语言 (WSDL) 操作。Gets the WebMethodAttribute for the method that the protocol reflector is currently processing to generate a Web Services Description Language (WSDL) operation to be placed in the generated ServiceDescription.

Methods

获取属于 Web 服务类的 Web 服务方法,如关联 ProtocolReflector 对象的 Methods 属性所标识。Gets the Web service methods belonging to the Web service class, as identified by the associated ProtocolReflector object's Methods property.

Operation

获取协议反射器当前正在通过 Web 服务方法生成的抽象 Web 服务描述语言 (WSDL) 操作。Gets the abstract Web Services Description Language (WSDL) operation that the protocol reflector is currently generating from a Web service method.

OperationBinding

获取协议导入程序当前正在通过 Web 服务方法生成的 Web 服务描述语言 (WSDL) 操作绑定。Gets the Web Services Description Language (WSDL) operation binding that the protocol importer is currently generating from a Web service method.

OutputMessage

获取抽象操作(协议反射器当前正在通过 Web 服务方法生成)的 Web 服务描述语言 (WSDL) 输出消息。Gets the Web Services Description Language (WSDL) output message for the abstract operation that the protocol reflector is currently generating from a Web service method.

Port

获取协议反射器当前正在生成的 Web 服务描述语言 (WSDL) 端口,生成此端口的目的在于包含一个到正在生成的绑定的引用。Gets the Web Services Description Language (WSDL) port that the protocol reflector is currently generating to contain a reference to the binding being generated.

PortType

获取协议反射器当前正在生成的 Web 服务描述语言 (WSDL) portType,生成它的目的在于由正在生成的绑定来实现它。Gets the Web Services Description Language (WSDL) portType that the protocol reflector is currently generating to be implemented by the binding being generated.

ProtocolName

在派生类中重写时,获取正在使用的协议的名称。When overridden in a derived class, gets the name of the protocol being used.

ReflectionImporter

获取正由关联的 XmlReflectionImporter 实例使用的 ServiceDescriptionReflector 实例。Gets the XmlReflectionImporter instance being used by the associated ServiceDescriptionReflector instance.

SchemaExporter

获取正由关联的 XmlSchemaExporter 实例使用的 ServiceDescriptionReflector 实例。Gets the XmlSchemaExporter instance being used by the associated ServiceDescriptionReflector instance.

Schemas

获取正由关联的 ServiceDescriptionReflector 实例生成的 XML 架构。Gets the XML schemas being generated by the associated ServiceDescriptionReflector instance.

Service

获取 Web 服务描述语言 (WSDL) 服务,协议反射器当前正在生成该服务,以便包含一个到正在生成的绑定的引用。Gets the Web Services Description Language (WSDL) service that the protocol reflector is currently generating to contain a reference to the binding being generated.

ServiceDescription

获取当前正在创建的 ServiceDescription 对象,创建它的目的在于包含正在生成的绑定。Gets the ServiceDescription object currently being created to contain the binding being generated.

ServiceDescriptions

获取到目前为止已创建并添加到 ServiceDescription 集合中的 ServiceDescriptionCollection 对象,该集合通过关联的 ServiceDescriptions 实例的 ServiceDescriptionReflector 属性获取。Gets the ServiceDescription objects that have so far been created and added to the corresponding to the ServiceDescriptionCollection obtained through the ServiceDescriptions property of the associated ServiceDescriptionReflector instance.

ServiceType

获取正在反射以生成 ServiceDescription 对象的 Web 服务类的类型。Gets the type of the Web service class being reflected to produce ServiceDescription objects.

ServiceUrl

获取关联的 Web 服务的终结点(作为统一资源定位符 (URL)),该终结点从关联的 ServiceDescriptionReflector 对象获取。Gets the endpoint of the associated Web service as a Uniform Resource Locator (URL), obtained from the associated ServiceDescriptionReflector object.

方法

BeginClass()

在派生类中重写时,在 ProtocolReflector 为绑定的每个方法调用 ReflectMethod() 方法之前执行处理。When overridden in a derived class, performs processing before ProtocolReflector calls the ReflectMethod() method for each of the methods for a binding.

EndClass()

在派生类中重写时,在 ProtocolReflector 已为绑定的每个方法调用 ReflectMethod() 方法之后执行处理。When overridden in a derived class, performs processing after ProtocolReflector has called the ReflectMethod() method for each of the methods for a binding.

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetServiceDescription(String)

获取给定的 XML 命名空间和适用的通信协议的 ServiceDescription 对象。Gets a ServiceDescription object for a given XML namespace and the applicable communication protocol.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ReflectDescription()

在派生类中重写时,将生成放置在与绑定对应的 ServiceDescription 对象中的服务特定的描述信息。When overridden in a derived class, generates service-specific description information that gets placed in a ServiceDescription object that corresponds to a binding.

ReflectMethod()

在派生类中重写时,生成放置在与绑定对应的 ServiceDescription 对象中的方法特定的信息。When overridden in a derived class, generates method-specific information that gets placed in a ServiceDescription object corresponding to a binding.

ReflectMethodBinding()

在派生类中重写时,返回方法所属绑定的名称。When overridden in a derived class, returns the name of the binding that a method belongs to.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于