ServiceDescription Class

 

Provides a means of creating and formatting a valid Web Services Description Language (WSDL) document file, complete with appropriate namespaces, elements, and attributes, for describing an XML Web service. This class cannot be inherited.

Namespace:   System.Web.Services.Description
Assembly:  System.Web.Services (in System.Web.Services.dll)

System.Object
  System.Web.Services.Description.DocumentableItem
    System.Web.Services.Description.NamedItem
      System.Web.Services.Description.ServiceDescription

<XmlFormatExtensionPointAttribute("Extensions")>
Public NotInheritable Class ServiceDescription
	Inherits NamedItem

NameDescription
System_CAPS_pubmethodServiceDescription()

Initializes a new instance of the ServiceDescription class.

NameDescription
System_CAPS_pubpropertyBindings

Gets the collection of Binding elements contained in the ServiceDescription.

System_CAPS_pubpropertyDocumentation

Gets or sets the text documentation for the instance of the DocumentableItem.(Inherited from DocumentableItem.)

System_CAPS_pubpropertyDocumentationElement

Gets or sets the documentation element for the DocumentableItem.(Inherited from DocumentableItem.)

System_CAPS_pubpropertyExtensibleAttributes

Gets or sets an array of type XmlAttribute that represents attribute extensions of WSDL to comply with Web Services Interoperability (WS-I) Basic Profile 1.1.(Inherited from DocumentableItem.)

System_CAPS_pubpropertyExtensions

Gets the collection of extensibility elements contained in the ServiceDescription.(Overrides DocumentableItem.Extensions.)

System_CAPS_pubpropertyImports

Gets the collection of Import elements contained in the ServiceDescription.

System_CAPS_pubpropertyMessages

Gets the collection of Message elements contained in the ServiceDescription.

System_CAPS_pubpropertyName

Gets or sets the name of the item.(Inherited from NamedItem.)

System_CAPS_pubpropertyNamespaces

Gets or sets the dictionary of namespace prefixes and namespaces used to preserve namespace prefixes and namespaces when a ServiceDescription object is constructed.(Inherited from DocumentableItem.)

System_CAPS_pubpropertyPortTypes

Gets the collection of PortType elements contained in the ServiceDescription.

System_CAPS_pubpropertyRetrievalUrl

Gets or sets the URL of the XML Web service to which the ServiceDescription instance applies.

System_CAPS_pubpropertySystem_CAPS_staticSchema

Gets the schema associated with this ServiceDescription.

System_CAPS_pubpropertySystem_CAPS_staticSerializer

Gets the XML serializer used to serialize and deserialize between a ServiceDescription object and a Web Services Description Language (WSDL) document.

System_CAPS_pubpropertyServiceDescriptions

Gets the ServiceDescriptionCollection instance of which the ServiceDescription is a member.

System_CAPS_pubpropertyServices

Gets the collection of Service instances contained in the ServiceDescription.

System_CAPS_pubpropertyTargetNamespace

Gets or sets the XML targetNamespace attribute of the descriptions tag enclosing a Web Services Description Language (WSDL) file.

System_CAPS_pubpropertyTypes

Gets or sets the Types contained by the ServiceDescription.

System_CAPS_pubpropertyValidationWarnings

Gets a StringCollection that contains any validation warnings that were generated during a call to Read(Stream, Boolean), Read(TextReader, Boolean), Read(String, Boolean), or Read(XmlReader, Boolean) with the validate parameter set to true.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticCanRead(XmlReader)

Gets a value that indicates whether an XmlReader represents a valid Web Services Description Language (WSDL) file that can be parsed.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticRead(Stream)

Initializes an instance of the ServiceDescription class by directly loading the XML from a Stream instance.

System_CAPS_pubmethodSystem_CAPS_staticRead(Stream, Boolean)

Initializes an instance of the ServiceDescription class by directly loading the XML from a Stream instance.

System_CAPS_pubmethodSystem_CAPS_staticRead(String)

Initializes an instance of a ServiceDescription object by directly loading the XML from the specified file.

System_CAPS_pubmethodSystem_CAPS_staticRead(String, Boolean)

Initializes an instance of a ServiceDescription object by directly loading the XML from the specified file.

System_CAPS_pubmethodSystem_CAPS_staticRead(TextReader)

Initializes an instance of the ServiceDescription class by directly loading the XML from a TextReader.

System_CAPS_pubmethodSystem_CAPS_staticRead(TextReader, Boolean)

Initializes an instance of the ServiceDescription class by directly loading the XML from a TextReader.

System_CAPS_pubmethodSystem_CAPS_staticRead(XmlReader)

Initializes an instance of the ServiceDescription class by directly loading the XML from an XmlReader.

System_CAPS_pubmethodSystem_CAPS_staticRead(XmlReader, Boolean)

Initializes an instance of the ServiceDescription class by directly loading the XML from an XmlReader.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodWrite(Stream)

Writes out the ServiceDescription to the specified Stream.

System_CAPS_pubmethodWrite(String)

Writes out the ServiceDescription as a Web Services Description Language (WSDL) file to the specified path.

System_CAPS_pubmethodWrite(TextWriter)

Writes out the ServiceDescription as a Web Services Description Language (WSDL) file to the TextWriter.

System_CAPS_pubmethodWrite(XmlWriter)

Writes out the ServiceDescription to the XmlWriter as a Web Services Description Language (WSDL) file.

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticNamespace

The XML namespace in which the ServiceDescription class is defined ("http://schemas.xmlsoap.org/wsdl/"). This field is constant.

Instances of this class can be created with either the new keyword or the static Read method, which parses a WSDL file and assigns its values to appropriate members of the class.

WSDL is an XML-based language for describing XML Web services. The ServiceDescription class corresponds to the root element, definitions, of a WSDL file. For more information about WSDL, see the specification at http://www.w3.org/TR/wsdl/.

The following example shows how to create an instance of the ServiceDescription class.

' Obtain the ServiceDescription of existing Wsdl.
Dim myDescription As ServiceDescription = ServiceDescription.Read("MyWsdl_VB.wsdl")
' Remove the Binding from the Binding Collection of ServiceDescription.
Dim myBindingCollection As BindingCollection = myDescription.Bindings
myBindingCollection.Remove(myBindingCollection(0))

' Form a new Binding.
Dim myBinding As New Binding()
myBinding.Name = "Service1Soap"
Dim myXmlQualifiedName As New XmlQualifiedName("s0:Service1Soap")
myBinding.Type = myXmlQualifiedName

Dim mySoapBinding As New SoapBinding()
mySoapBinding.Transport = "http://schemas.xmlsoap.org/soap/http"
mySoapBinding.Style = SoapBindingStyle.Document

Dim addOperationBinding As OperationBinding = CreateOperationBinding("Add", _
                                             myDescription.TargetNamespace)
myBinding.Operations.Add(addOperationBinding)
myBinding.Extensions.Add(mySoapBinding)

' Add the Binding to the ServiceDescription.
myDescription.Bindings.Add(myBinding)
myDescription.Write("MyOutWsdl.wsdl")

.NET Framework
Available since 1.1

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: