ServiceDescription.Read Method (XmlReader)

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

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

public:
static ServiceDescription^ Read (
	XmlReader^ reader
)
public static ServiceDescription Read (
	XmlReader reader
)
public static function Read (
	reader : XmlReader
) : ServiceDescription
Not applicable.

Parameters

reader

An XmlReader, passed by reference, which contains the XML data to be read.

Return Value

Returns a ServiceDescription.

// Create a new XmlTextWriter with specified URL.
XmlTextReader^ myXmlReader = gcnew XmlTextReader( "All_CS.wsdl" );
ServiceDescription^ myServiceDescription = ServiceDescription::Read( myXmlReader );
myServiceDescription->TargetNamespace = "http://tempuri.org/";

// Remove the service named MathService.
ServiceCollection^ myServiceDescriptionCollection = myServiceDescription->Services;
myServiceDescriptionCollection->Remove( myServiceDescription->Services[ "MathService" ] );

// Create a new XmlTextWriter with specified URL.
XmlTextReader myXmlReader = new XmlTextReader("All_JSL.wsdl");
ServiceDescription myServiceDescription = 
    ServiceDescription.Read(myXmlReader);
myServiceDescription.set_TargetNamespace("http://tempuri.org/");
// Remove the service named MathService.
ServiceCollection myServiceDescriptionCollection = 
    myServiceDescription.get_Services();
myServiceDescriptionCollection.Remove(myServiceDescription.
    get_Services().get_Item("MathService"));

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: