Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ProtocolReflector Class

Provides common functionality across communication protocols for creating ServiceDescription objects from classes that are identified as Web services.

System.Object
  System.Web.Services.Description.ProtocolReflector

Namespace:  System.Web.Services.Description
Assembly:  System.Web.Services (in System.Web.Services.dll)
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
public abstract class ProtocolReflector

The ProtocolReflector type exposes the following members.

  NameDescription
Protected methodProtocolReflectorInitializes a new instance of the ProtocolReflector class.
Top
  NameDescription
Public propertyBindingGets the Web Services Description Language (WSDL) binding currently being generated and added to the associated ServiceDescription.
Public propertyDefaultNamespaceGets the default namespace, as identified by the associated ServiceDescription object's Namespace property.
Public propertyHeaderMessagesGets SOAP header message definitions to be added to the associated ServiceDescription object.
Public propertyInputMessageGets the Web Services Description Language (WSDL) input message for the abstract operation that the protocol reflector is currently generating from a Web service method.
Public propertyMethodGets 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.
Public propertyMethodAttributeGets 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.
Public propertyMethodsGets the Web service methods belonging to the Web service class, as identified by the associated ProtocolReflector object's Methods property.
Public propertyOperationGets the abstract Web Services Description Language (WSDL) operation that the protocol reflector is currently generating from a Web service method.
Public propertyOperationBindingGets the Web Services Description Language (WSDL) operation binding that the protocol importer is currently generating from a Web service method.
Public propertyOutputMessageGets the Web Services Description Language (WSDL) output message for the abstract operation that the protocol reflector is currently generating from a Web service method.
Public propertyPortGets the Web Services Description Language (WSDL) port that the protocol reflector is currently generating to contain a reference to the binding being generated.
Public propertyPortTypeGets the Web Services Description Language (WSDL) portType that the protocol reflector is currently generating to be implemented by the binding being generated.
Public propertyProtocolNameWhen overridden in a derived class, gets the name of the protocol being used.
Public propertyReflectionImporterGets the XmlReflectionImporter instance being used by the associated ServiceDescriptionReflector instance.
Public propertySchemaExporterGets the XmlSchemaExporter instance being used by the associated ServiceDescriptionReflector instance.
Public propertySchemasGets the XML schemas being generated by the associated ServiceDescriptionReflector instance.
Public propertyServiceGets the Web Services Description Language (WSDL) service that the protocol reflector is currently generating to contain a reference to the binding being generated.
Public propertyServiceDescriptionGets the ServiceDescription object currently being created to contain the binding being generated.
Public propertyServiceDescriptionsGets 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.
Public propertyServiceTypeGets the type of the Web service class being reflected to produce ServiceDescription objects.
Public propertyServiceUrlGets the endpoint of the associated Web service as a Uniform Resource Locator (URL), obtained from the associated ServiceDescriptionReflector object.
Top
  NameDescription
Protected methodBeginClassWhen overridden in a derived class, performs processing before ProtocolReflector calls the ReflectMethod method for each of the methods for a binding.
Protected methodEndClassWhen overridden in a derived class, performs processing after [ProtocolReflector] has called the ReflectMethod method for each of the methods for a binding.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetServiceDescriptionGets a ServiceDescription object for a given XML namespace and the applicable communication protocol.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodReflectDescriptionWhen overridden in a derived class, generates service-specific description information that gets placed in a ServiceDescription object that corresponds to a binding.
Protected methodReflectMethodWhen overridden in a derived class, generates method-specific information that gets placed in a ServiceDescription object corresponding to a binding.
Protected methodReflectMethodBindingWhen overridden in a derived class, returns the name of the binding that a method belongs to.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.