Read Method (TextReader)

ServiceDescription.Read Method (TextReader)


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

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

public static ServiceDescription Read(
	TextReader textReader


Type: System.IO.TextReader

A TextReader instance, passed by reference, which contains the text to be read.

ServiceDescription myDescription = new ServiceDescription();

// Create a StreamReader to read a WSDL file.
TextReader myTextReader = new StreamReader("MyWsdl.wsdl");
myDescription = ServiceDescription.Read(myTextReader);
Console.WriteLine("Bindings are: ");

// Display the Bindings present in the WSDL file.
foreach(Binding myBinding in myDescription.Bindings)

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft