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.
Assembly: System.Web.Services (in System.Web.Services.dll)
System.Web.Services.Description::DocumentableItem
System.Web.Services.Description::NamedItem
System.Web.Services.Description::ServiceDescription
| Name | Description | |
|---|---|---|
![]() | ServiceDescription() | Initializes a new instance of the ServiceDescription class. |
| Name | Description | |
|---|---|---|
![]() | Bindings | Gets the collection of Binding elements contained in the ServiceDescription. |
![]() | Documentation | Gets or sets the text documentation for the instance of the DocumentableItem.(Inherited from DocumentableItem.) |
![]() | DocumentationElement | Gets or sets the documentation element for the DocumentableItem.(Inherited from DocumentableItem.) |
![]() | ExtensibleAttributes | 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.) |
![]() | Extensions | Gets the collection of extensibility elements contained in the ServiceDescription.(Overrides DocumentableItem::Extensions.) |
![]() | Imports | Gets the collection of Import elements contained in the ServiceDescription. |
![]() | Messages | Gets the collection of Message elements contained in the ServiceDescription. |
![]() | Name | Gets or sets the name of the item.(Inherited from NamedItem.) |
![]() | Namespaces | 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.) |
![]() | PortTypes | Gets the collection of PortType elements contained in the ServiceDescription. |
![]() | RetrievalUrl | Gets or sets the URL of the XML Web service to which the ServiceDescription instance applies. |
![]() ![]() | Schema | Gets the schema associated with this ServiceDescription. |
![]() ![]() | Serializer | Gets the XML serializer used to serialize and deserialize between a ServiceDescription object and a Web Services Description Language (WSDL) document. |
![]() | ServiceDescriptions | Gets the ServiceDescriptionCollection instance of which the ServiceDescription is a member. |
![]() | Services | Gets the collection of Service instances contained in the ServiceDescription. |
![]() | TargetNamespace | Gets or sets the XML targetNamespace attribute of the descriptions tag enclosing a Web Services Description Language (WSDL) file. |
![]() | Types | Gets or sets the Types contained by the ServiceDescription. |
![]() | ValidationWarnings | 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. |
| Name | Description | |
|---|---|---|
![]() ![]() | CanRead(XmlReader^) | Gets a value that indicates whether an XmlReader represents a valid Web Services Description Language (WSDL) file that can be parsed. |
![]() | 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.) |
![]() | GetType() | |
![]() ![]() | Read(Stream^) | Initializes an instance of the ServiceDescription class by directly loading the XML from a Stream instance. |
![]() ![]() | Read(Stream^, Boolean) | Initializes an instance of the ServiceDescription class by directly loading the XML from a Stream instance. |
![]() ![]() | Read(String^) | Initializes an instance of a ServiceDescription object by directly loading the XML from the specified file. |
![]() ![]() | Read(String^, Boolean) | Initializes an instance of a ServiceDescription object by directly loading the XML from the specified file. |
![]() ![]() | Read(TextReader^) | Initializes an instance of the ServiceDescription class by directly loading the XML from a TextReader. |
![]() ![]() | Read(TextReader^, Boolean) | Initializes an instance of the ServiceDescription class by directly loading the XML from a TextReader. |
![]() ![]() | Read(XmlReader^) | Initializes an instance of the ServiceDescription class by directly loading the XML from an XmlReader. |
![]() ![]() | Read(XmlReader^, Boolean) | Initializes an instance of the ServiceDescription class by directly loading the XML from an XmlReader. |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
![]() | Write(Stream^) | Writes out the ServiceDescription to the specified Stream. |
![]() | Write(String^) | Writes out the ServiceDescription as a Web Services Description Language (WSDL) file to the specified path. |
![]() | Write(TextWriter^) | Writes out the ServiceDescription as a Web Services Description Language (WSDL) file to the TextWriter. |
![]() | Write(XmlWriter^) | Writes out the ServiceDescription to the XmlWriter as a Web Services Description Language (WSDL) file. |
| Name | Description | |
|---|---|---|
![]() ![]() | Namespace | 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. ServiceDescription^ myDescription = ServiceDescription::Read( "MyWsdl_CS.wsdl" ); // Remove the Binding from the Binding Collection of ServiceDescription. BindingCollection^ myBindingCollection = myDescription->Bindings; myBindingCollection->Remove( myBindingCollection[ 0 ] ); // Form a new Binding. Binding^ myBinding = gcnew Binding; myBinding->Name = "Service1Soap"; XmlQualifiedName^ myXmlQualifiedName = gcnew XmlQualifiedName( "s0:Service1Soap" ); myBinding->Type = myXmlQualifiedName; SoapBinding^ mySoapBinding = gcnew SoapBinding; mySoapBinding->Transport = "http://schemas.xmlsoap.org/soap/http"; mySoapBinding->Style = SoapBindingStyle::Document; OperationBinding^ addOperationBinding = 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" );
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.
.jpeg?cs-save-lang=1&cs-lang=cpp)
.jpeg?cs-save-lang=1&cs-lang=cpp)
.jpeg?cs-save-lang=1&cs-lang=cpp)
.jpeg?cs-save-lang=1&cs-lang=cpp)