WsdlImporter::ImportContract Method (PortType^)

 

Returns a ContractDescription object that represents metadata located by the specified port type information.

Namespace:   System.ServiceModel.Description
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public:
ContractDescription^ ImportContract(
	PortType^ wsdlPortType
)

Parameters

wsdlPortType
Type: System.Web.Services.Description::PortType^

A System.Web.Services.Description::PortType object that represents the desired port type.

Return Value

Type: System.ServiceModel.Description::ContractDescription^

A ContractDescription object that represents metadata located by the specified port type information.

Exception Condition
InvalidOperationException

The WsdlImporter has encountered an error.

ArgumentNullException

The port type is null.

Use the ImportContract method to use a System.Web.Services.Description::PortType object to locate port type information in the metadata and return that information as a ContractDescription object. Check the Errors property to determine whether there are any import errors before using the returned object.

.NET Framework
Available since 3.0
Return to top
Show: