ServiceDescription::Read Method (TextReader^)
.NET Framework (current version)
Initializes an instance of the ServiceDescription class by directly loading the XML from a TextReader.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- textReader
-
Type:
System.IO::TextReader^
A TextReader instance, passed by reference, which contains the text to be read.
Return Value
Type: System.Web.Services.Description::ServiceDescription^An instance of the ServiceDescription.
ServiceDescription^ myDescription = gcnew ServiceDescription; // Create a StreamReader to read a WSDL file. TextReader^ myTextReader = gcnew StreamReader( "MyWsdl.wsdl" ); myDescription = ServiceDescription::Read( myTextReader ); Console::WriteLine( "Bindings are: " ); // Display the Bindings present in the WSDL file. System::Collections::IEnumerator^ myEnum = myDescription->Bindings->GetEnumerator(); while ( myEnum->MoveNext() ) { Binding^ myBinding = safe_cast<Binding^>(myEnum->Current); Console::WriteLine( myBinding->Name ); }
.NET Framework
Available since 1.1
Available since 1.1
Show: