ProtocolReflector Class

Definition

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
Inheritance
ProtocolReflector

Remarks

The abstract ProtocolReflector class and its concrete derived classes create ServiceDescription objects from classes that are identified as Web services with the WebServiceAttribute attribute. Each concrete ProtocolReflector-derived class generates ServiceDescription objects according to a specified communication protocol; ProtocolReflector provides common functionality regardless of the protocol.

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. The ServiceDescription instance can also be used by the ServiceDescriptionImporter class and related classes to generate client proxy code or abstract server code.

The ProtocolReflector class uses the WebServiceBindingAttribute to create a ServiceDescription for each binding it identifies in the Web service class. If that attribute is not present, the ProtocolReflector class creates a single binding for the entire class. For 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.

Typically, a developer uses these classes indirectly through the ServiceDescriptionReflector class, instead of directly invoking classes derived from ProtocolReflector.

Constructors

ProtocolReflector()

Initializes a new instance of the ProtocolReflector class.

Properties

Binding

Gets the Web Services Description Language (WSDL) binding currently being generated and added to the associated ServiceDescription.

DefaultNamespace

Gets the default namespace, as identified by the associated ServiceDescription object's Namespace property.

HeaderMessages

Gets SOAP header message definitions to be added to the associated ServiceDescription object.

InputMessage

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

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

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

Gets the Web service methods belonging to the Web service class, as identified by the associated ProtocolReflector object's Methods property.

Operation

Gets the abstract Web Services Description Language (WSDL) operation that the protocol reflector is currently generating from a Web service method.

OperationBinding

Gets the Web Services Description Language (WSDL) operation binding that the protocol importer is currently generating from a Web service method.

OutputMessage

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

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

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

Gets the XmlReflectionImporter instance being used by the associated ServiceDescriptionReflector instance.

SchemaExporter

Gets the XmlSchemaExporter instance being used by the associated ServiceDescriptionReflector instance.

Schemas

Gets the XML schemas being generated by the associated ServiceDescriptionReflector instance.

Service

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

Gets the ServiceDescription object currently being created to contain the binding being generated.

ServiceDescriptions

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

Gets the type of the Web service class being reflected to produce ServiceDescription objects.

ServiceUrl

Gets the endpoint of the associated Web service as a Uniform Resource Locator (URL), obtained from the associated ServiceDescriptionReflector object.

Methods

BeginClass()

When overridden in a derived class, performs processing before ProtocolReflector calls the ReflectMethod() method for each of the methods for a binding.

EndClass()

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.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetServiceDescription(String)

Gets a ServiceDescription object for a given XML namespace and the applicable communication protocol.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ReflectDescription()

When overridden in a derived class, generates service-specific description information that gets placed in a ServiceDescription object that corresponds to a binding.

ReflectMethod()

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.

(Inherited from Object)

Applies to