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 Function GetService (
	name As XmlQualifiedName
) As Service

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.
Dim myXmlQualifiedName As _
   New XmlQualifiedName("MathService", "http://tempuri2.org/")

' Get the Service from the collection.
Dim myService As Service = myCollection.GetService(myXmlQualifiedName)

.NET Framework
Available since 1.1
Return to top
Show: