Operation.Faults Property
.NET Framework 3.0
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)
Assembly: System.Web.Services (in system.web.services.dll)
// 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" ] );
// Read the 'Operation_Faults_Input_JSL.wsdl' file as input.
ServiceDescription myServiceDescription = ServiceDescription.
Read("Operation_Faults_Input_JSL.wsdl");
// Get the operation fault collection.
PortTypeCollection myPortTypeCollection = myServiceDescription.
get_PortTypes();
PortType myPortType = myPortTypeCollection.get_Item(0);
OperationCollection myOperationCollection = myPortType.get_Operations();
// Remove the operation fault with the name 'ErrorString'.
Operation myOperation = myOperationCollection.get_Item(0);
OperationFaultCollection myOperationFaultCollection = myOperation.
get_Faults();
if (myOperationFaultCollection.Contains(myOperationFaultCollection.
get_Item("ErrorString"))) {
myOperationFaultCollection.Remove(myOperationFaultCollection.
get_Item("ErrorString"));
}
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.Community Additions
ADD
Show: