Operation::Faults Property

 

Gets the collection of faults, or error messages, defined by the current Operation.

Namespace:   System.Web.Services.Description
Assembly:  System.Web.Services (in System.Web.Services.dll)

public:
property OperationFaultCollection^ Faults {
	OperationFaultCollection^ get();
}

Property Value

Type: System.Web.Services.Description::OperationFaultCollection^

A collection of faults, or error messages, defined by the current operation.

// Read the 'Operation_Faults_Input_cpp.wsdl' file as input.
ServiceDescription^ myServiceDescription = ServiceDescription::Read( "Operation_Faults_Input_cpp.wsdl" );

// Get the operation fault collection.
PortTypeCollection^ myPortTypeCollection = myServiceDescription->PortTypes;
PortType^ myPortType = myPortTypeCollection[ 0 ];
OperationCollection^ myOperationCollection = myPortType->Operations;

// Remove the operation fault with the name 'ErrorString'.
Operation^ myOperation = myOperationCollection[ 0 ];
OperationFaultCollection^ myOperationFaultCollection = myOperation->Faults;
if ( myOperationFaultCollection->Contains( myOperationFaultCollection[ "ErrorString" ] ) )
   myOperationFaultCollection->Remove( myOperationFaultCollection[ "ErrorString" ] );

.NET Framework
Available since 1.1
Return to top
Show: