This documentation is archived and is not being maintained.
DiscoveryClientProtocol::Errors Property
Visual Studio 2010
Gets a collection of exceptions that occurred during invocation of method from this class.
Assembly: System.Web.Services (in System.Web.Services.dll)
public: property DiscoveryExceptionDictionary^ Errors { DiscoveryExceptionDictionary^ get (); }
Property Value
Type: System.Web.Services.Discovery::DiscoveryExceptionDictionaryA DiscoveryExceptionDictionary of exceptions.
The Errors collection is populated with exceptions that occurred during invocations to the Discover, DiscoverAny, ResolveAll, and ResolveOneLevel methods. The DiscoveryExceptionDictionary is cleared on invocation of these methods.
String^ myDiscoFile = "http://localhost/MathService_cs.vsdisco"; String^ myUrlKey = "http://localhost/MathService_cs.asmx?wsdl"; DiscoveryClientProtocol^ myDiscoveryClientProtocol = gcnew DiscoveryClientProtocol; // Get the discovery document. DiscoveryDocument^ myDiscoveryDocument = myDiscoveryClientProtocol->Discover( myDiscoFile ); IEnumerator^ myEnumerator = myDiscoveryDocument->References->GetEnumerator(); while ( myEnumerator->MoveNext() ) { ContractReference^ myContractReference = dynamic_cast<ContractReference^>(myEnumerator->Current); // Get the DiscoveryClientProtocol from the ContractReference. myDiscoveryClientProtocol = myContractReference->ClientProtocol; myDiscoveryClientProtocol->ResolveAll(); DiscoveryExceptionDictionary^ myExceptionDictionary = myDiscoveryClientProtocol->Errors; if ( myExceptionDictionary->Contains( myUrlKey ) ) { Console::WriteLine( "System generated exceptions." ); // Get the exception from the DiscoveryExceptionDictionary. Exception^ myException = myExceptionDictionary[ myUrlKey ]; Console::WriteLine( " Source : {0}", myException->Source ); Console::WriteLine( " Exception : {0}", myException->Message ); } } }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: