This documentation is archived and is not being maintained.

ServiceDescription.Write Method

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

Overload List

Writes out the ServiceDescription to the specified Stream.

[Visual Basic] Overloads Public Sub Write(Stream)
[C#] public void Write(Stream);
[C++] public: void Write(Stream*);
[JScript] public function Write(Stream);

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

[Visual Basic] Overloads Public Sub Write(String)
[C#] public void Write(string);
[C++] public: void Write(String*);
[JScript] public function Write(String);

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

[Visual Basic] Overloads Public Sub Write(TextWriter)
[C#] public void Write(TextWriter);
[C++] public: void Write(TextWriter*);
[JScript] public function Write(TextWriter);

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

[Visual Basic] Overloads Public Sub Write(XmlWriter)
[C#] public void Write(XmlWriter);
[C++] public: void Write(XmlWriter*);
[JScript] public function Write(XmlWriter);

Example

[Visual Basic, C#, C++] Note   This example shows how to use one of the overloaded versions of Write. For other examples that might be available, see the individual overload topics.
[Visual Basic] 
' Create a new XmlTextWriter.
Dim myWriter As New XmlTextWriter("output.wsdl", Encoding.UTF8)
myWriter.Formatting = Formatting.Indented

' Write the WSDL.
myServiceDescription.Write(myWriter)

[C#] 
// Create a new XmlTextWriter object.
     XmlTextWriter myWriter = new XmlTextWriter("output.wsdl",Encoding.UTF8);
     myWriter.Formatting = Formatting.Indented; 

     // Write the WSDL.
     myServiceDescription.Write(myWriter);

[C++] 
// Create a new XmlTextWriter object.
XmlTextWriter* myWriter = new XmlTextWriter(S"output.wsdl",Encoding::UTF8);
myWriter->Formatting = Formatting::Indented; 

// Write the WSDL.
myServiceDescription->Write(myWriter);

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

ServiceDescription Class | ServiceDescription Members | System.Web.Services.Description Namespace

Show: