ServiceDescriptionCollection::GetService Method (XmlQualifiedName^)

 

Searches the ServiceDescriptionCollection and returns the Service with the specified name that is a member of one of the ServiceDescription instances contained in the collection.

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

public:
Service^ GetService(
	XmlQualifiedName^ name
)

Parameters

name
Type: System.Xml::XmlQualifiedName^

The XmlQualifiedName, passed by reference, whose Name property is shared by the Service returned.

Return Value

Type: System.Web.Services.Description::Service^

The service with the specified name.

Exception Condition
Exception

The specified Service is not a member of any ServiceDescription instances within the collection.

// Construct an XML qualified name.
XmlQualifiedName^ myXmlQualifiedName =
   gcnew XmlQualifiedName( "MathService","http://tempuri2.org/" );

// Get the Service from the collection.
myCollection->GetService( myXmlQualifiedName );

.NET Framework
Available since 1.1
Return to top
Show: