ServiceDescriptionCollection.GetPortType Method

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
)
public PortType GetPortType (
	XmlQualifiedName name
)
public function GetPortType (
	name : XmlQualifiedName
) : PortType
Not applicable.

Parameters

name

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

Return Value

A PortType.

Exception typeCondition

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 );

// Construct an XML qualified name.
XmlQualifiedName myXmlQualifiedName = 
    new XmlQualifiedName("MathServiceSoap", "http://tempuri2.org/");

// Get the PortType from the collection.
PortType myPort = myCollection.GetPortType(myXmlQualifiedName);

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: