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:
PortType^ GetPortType(
	XmlQualifiedName^ name
)

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.
XmlQualifiedName^ myXmlQualifiedName =
   gcnew XmlQualifiedName( "MathServiceSoap","http://tempuri2.org/" );

// Get the PortType from the collection.
myCollection->GetPortType( myXmlQualifiedName );

.NET Framework
Available since 1.1
Return to top
Show: