ServiceDescriptionCollection.GetPortType Method (XmlQualifiedName)

 

Searches the ServiceDescriptionCollection and returns the PortType 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 GetPortType (
	name As XmlQualifiedName
) As PortType

Parameters

name
Type: System.Xml.XmlQualifiedName

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

Return Value

Type: System.Web.Services.Description.PortType

The PortType with the specified name.

Exception Condition
Exception

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

' Construct an XML qualified name.
Dim myXmlQualifiedName As _
   New XmlQualifiedName("MathServiceSoap", "http://tempuri2.org/")
' Get the PortType from the collection.
Dim myPort As PortType = myCollection.GetPortType(myXmlQualifiedName)

.NET Framework
Available since 1.1
Return to top
Show: