Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Überprüft alle Dokumente im Discovery-Dokument, auf die verwiesen wird, auf ihre Gültigkeit.
Namespace: System.Web.Services.Discovery
Assembly: System.Web.Services (in system.web.services.dll)
Syntax
'Declaration
Public Sub ResolveAll
'Usage
Dim instance As DiscoveryDocumentReference
instance.ResolveAll
public void ResolveAll ()
public:
void ResolveAll ()
public void ResolveAll ()
public function ResolveAll ()
Ausnahmen
| Ausnahmetyp | Bedingung |
|---|---|
Der Wert der ClientProtocol-Eigenschaft ist NULL (Nothing in Visual Basic). - oder - Das Discovery-Dokument konnte nicht erfolgreich gedownloadet und überprüft werden. |
Hinweise
Wenn Sie nicht ausdrücklich die einzelnen Verweise eines DiscoveryDocumentReference-Objekts auflösen müssen, sollten Sie die ResolveAll-Methode oder die ResolveOneLevel-Methode von DiscoveryClientProtocol aufrufen.
Diese Methode löst alle Verweise auf Discovery-Dokumente, XSD-Schemas und Dienstbeschreibungen in der References-Eigenschaft von ClientProtocol sowie alle gefundenen Verweise in den betreffenden Discovery-Dokumenten auf.
Beispiel
Imports System
Imports System.Web.Services.Discovery
Imports System.Collections
Imports System.Security.Permissions
Imports MicroSoft.VisualBasic
Class DiscoveryDocumentReference_Document_ResolveAll
Shared Sub Main()
Run()
End Sub 'Main
<PermissionSetAttribute(SecurityAction.Demand, Name := "FullTrust")> _
Shared Sub Run()
Try
Dim myUrl As String = "https://localhost/Sample_vb.vsdisco"
Dim myProtocol As New DiscoveryClientProtocol()
' Get the discovery document myDiscoveryDocument.
Dim myDiscoveryDocument As DiscoveryDocument = myProtocol.Discover(myUrl)
' Get the references of myDiscoveryDocument.
Dim myEnumerator As IEnumerator = myDiscoveryDocument.References.GetEnumerator()
While myEnumerator.MoveNext()
Dim myNewReference As DiscoveryDocumentReference = _
CType(myEnumerator.Current, DiscoveryDocumentReference)
' Set the ClientProtocol of myNewReference.
Dim myNewProtocol As DiscoveryClientProtocol = myNewReference.ClientProtocol
' Verify for all the valid references.
myNewReference.ResolveAll()
' Get the document of myNewReference.
Dim myNewDiscoveryDocument As DiscoveryDocument = myNewReference.Document
Dim myNewEnumerator As IEnumerator = _
myNewDiscoveryDocument.References.GetEnumerator()
Console.WriteLine("The valid discovery document is : " + ControlChars.NewLine)
While myNewEnumerator.MoveNext()
' Display the references of myNewDiscoveryDocument on the console.
Console.WriteLine(CType(myNewEnumerator.Current, DiscoveryDocumentReference).Ref)
End While
End While
Catch e As Exception
Console.WriteLine("Exception :{0}", e.Message)
End Try
End Sub 'Run
End Class 'DiscoveryDocumentReference_Document_ResolveAll
using System;
using System.Web.Services.Discovery;
using System.Collections;
using System.Security.Permissions;
class DiscoveryDocumentReference_Document_ResolveAll
{
static void Main()
{
Run();
}
[PermissionSetAttribute(SecurityAction.Demand, Name="FullTrust")]
static void Run()
{
try
{
string myUrl = "https://localhost/Sample_cs.vsdisco";
DiscoveryClientProtocol myProtocol = new DiscoveryClientProtocol();
// Get the discovery document myDiscoveryDocument.
DiscoveryDocument myDiscoveryDocument = myProtocol.Discover(myUrl);
// Get the references of myDiscoveryDocument.
IEnumerator myEnumerator = myDiscoveryDocument.References.GetEnumerator();
while(myEnumerator.MoveNext())
{
DiscoveryDocumentReference myNewReference =
(DiscoveryDocumentReference)myEnumerator.Current;
// Set the ClientProtocol of myNewReference.
DiscoveryClientProtocol myNewProtocol = myNewReference.ClientProtocol;
// Verify for all the valid references.
myNewReference.ResolveAll();
// Get the document of myNewReference.
DiscoveryDocument myNewDiscoveryDocument =
myNewReference.Document;
IEnumerator myNewEnumerator =
myNewDiscoveryDocument.References.GetEnumerator();
Console.WriteLine("The valid discovery document is : \n");
while(myNewEnumerator.MoveNext())
{
// Display the references of myNewDiscoveryDocument on the console.
Console.WriteLine(((DiscoveryDocumentReference)myNewEnumerator.Current).Ref);
}
}
}
catch(Exception e)
{
Console.WriteLine("Exception :{0}", e.Message);
}
}
}
Plattformen
Windows 98, Windows 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
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
DiscoveryDocumentReference-Klasse
DiscoveryDocumentReference-Member
System.Web.Services.Discovery-Namespace
ResolveAll
DiscoveryClientProtocol-Klasse
ResolveOneLevel