DiscoveryDocumentReference クラス
アセンブリ: System.Web.Services (system.web.services.dll 内)


XML Web サービス探索には、指定 URL で使用できる XML Web サービスの探索が含まれます。通常、URL は探索ドキュメントを指します。探索ドキュメントのファイル名拡張子は通常 .disco です。探索ドキュメントには、サービスの説明、XML スキーマ定義言語 (XSD) スキーマ、他の探索ドキュメントなどの XML Web サービスがあるかどうかに関する情報への参照が含まれています。このクラスは、探索ドキュメントへの参照を表します。

Imports System Imports System.Xml Imports System.Web.Services.Discovery Imports System.IO Imports System.Collections Imports MicroSoft.VisualBasic Public Class DiscoveryDocumentReference_ctor_WriteDocument Public Shared Sub Main() Try Dim myDiscoveryDocument As DiscoveryDocument Dim myXmlTextReader As _ New XmlTextReader("http://localhost/Sample_vb.vsdisco") myDiscoveryDocument = DiscoveryDocument.Read(myXmlTextReader) ' Create a new instance of DiscoveryDocumentReference. Dim myDiscoveryDocumentReference As _ New DiscoveryDocumentReference() Dim myFileStream As New FileStream("Temp.vsdisco", _ FileMode.OpenOrCreate, FileAccess.Write) myDiscoveryDocumentReference.WriteDocument( _ myDiscoveryDocument, myFileStream) myFileStream.Close() Dim myFileStream1 As New FileStream("Temp.vsdisco", _ FileMode.OpenOrCreate, FileAccess.Read) Dim myStreamReader As New StreamReader(myFileStream1) ' Initialize the file pointer. myStreamReader.BaseStream.Seek(0, SeekOrigin.Begin) Console.WriteLine("The contents of the discovery document are: " _ & ControlChars.NewLine) While myStreamReader.Peek() > - 1 ' Display the contents of the discovery document. Console.WriteLine(myStreamReader.ReadLine()) End While myStreamReader.Close() Catch e As Exception Console.WriteLine("Exception: {0}", e.Message.ToString()) End Try End Sub 'Main End Class 'DiscoveryDocumentReference_ctor_WriteDocument
using System; using System.Xml; using System.Web.Services.Discovery; using System.IO; using System.Collections; public class DiscoveryDocumentReference_ctor_WriteDocument { public static void Main() { try { DiscoveryDocument myDiscoveryDocument; XmlTextReader myXmlTextReader = new XmlTextReader("http://localhost/Sample_cs.vsdisco"); myDiscoveryDocument = DiscoveryDocument.Read(myXmlTextReader); // Create a new instance of DiscoveryDocumentReference. DiscoveryDocumentReference myDiscoveryDocumentReference = new DiscoveryDocumentReference(); FileStream myFileStream = new FileStream("Temp.vsdisco" , FileMode.OpenOrCreate, FileAccess.Write); myDiscoveryDocumentReference.WriteDocument( myDiscoveryDocument, myFileStream); myFileStream.Close(); FileStream myFileStream1 = new FileStream("Temp.vsdisco" , FileMode.OpenOrCreate, FileAccess.Read); StreamReader myStreamReader = new StreamReader(myFileStream1); // Initialize the file pointer. myStreamReader.BaseStream.Seek(0, SeekOrigin.Begin); Console.WriteLine("The contents of the discovery document are: \n"); while(myStreamReader.Peek() > -1) { // Display the contents of the discovery document. Console.WriteLine(myStreamReader.ReadLine()); } myStreamReader.Close(); } catch(Exception e) { Console.WriteLine("Exception: {0}", e.Message); } } }
#using <System.Web.Services.dll> #using <System.Xml.dll> using namespace System; using namespace System::Xml; using namespace System::Web::Services::Discovery; using namespace System::IO; using namespace System::Collections; int main() { try { DiscoveryDocument^ myDiscoveryDocument; XmlTextReader^ myXmlTextReader = gcnew XmlTextReader( "http://localhost/Sample_cs::vsdisco" ); myDiscoveryDocument = DiscoveryDocument::Read( myXmlTextReader ); // Create a new instance of DiscoveryDocumentReference. DiscoveryDocumentReference^ myDiscoveryDocumentReference = gcnew DiscoveryDocumentReference; FileStream^ myFileStream = gcnew FileStream( "Temp::vsdisco",FileMode::OpenOrCreate,FileAccess::Write ); myDiscoveryDocumentReference->WriteDocument( myDiscoveryDocument, myFileStream ); myFileStream->Close(); FileStream^ myFileStream1 = gcnew FileStream( "Temp::vsdisco",FileMode::OpenOrCreate,FileAccess::Read ); StreamReader^ myStreamReader = gcnew StreamReader( myFileStream1 ); // Initialize the file pointer. myStreamReader->BaseStream->Seek( 0, SeekOrigin::Begin ); Console::WriteLine( "The contents of the discovery document are: \n" ); while ( myStreamReader->Peek() > -1 ) { // Display the contents of the discovery document. Console::WriteLine( myStreamReader->ReadLine() ); } myStreamReader->Close(); } catch ( Exception^ e ) { Console::WriteLine( "Exception: {0}", e->Message ); } }
import System.*; import System.Xml.*; import System.Web.Services.Discovery.*; import System.IO.*; import System.Collections.*; public class DiscoveryDocumentReferenceCtorWriteDocument { public static void main(String[] args) { try { DiscoveryDocument myDiscoveryDocument; XmlTextReader myXmlTextReader = new XmlTextReader("http://localhost/Sample_jsl.vsdisco"); myDiscoveryDocument = DiscoveryDocument.Read(myXmlTextReader); // Create a new instance of DiscoveryDocumentReference. DiscoveryDocumentReference myDiscoveryDocumentReference = new DiscoveryDocumentReference(); FileStream myFileStream = new FileStream("Temp.vsdisco" , FileMode.OpenOrCreate, FileAccess.Write); myDiscoveryDocumentReference.WriteDocument(myDiscoveryDocument, myFileStream); myFileStream.Close(); FileStream myFileStream1 = new FileStream("Temp.vsdisco" , FileMode.OpenOrCreate, FileAccess.Read); StreamReader myStreamReader = new StreamReader(myFileStream1); // Initialize the file pointer. myStreamReader.get_BaseStream().Seek(0, SeekOrigin.Begin); Console.WriteLine("The contents of the discovery document are: \n"); while (myStreamReader.Peek() > -1) { // Display the contents of the discovery document. Console.WriteLine(myStreamReader.ReadLine()); } myStreamReader.Close(); } catch (System.Exception e) { Console.WriteLine("Exception: {0}", e.get_Message()); } } //main } //DiscoveryDocumentReferenceCtorWriteDocument

System.Web.Services.Discovery.DiscoveryReference
System.Web.Services.Discovery.DiscoveryDocumentReference


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


DiscoveryDocumentReference コンストラクタ ()
アセンブリ: System.Web.Services (system.web.services.dll 内)


' Create a new instance of DiscoveryDocumentReference. Dim myDiscoveryDocumentReference As _ New DiscoveryDocumentReference()
// Create a new instance of DiscoveryDocumentReference. DiscoveryDocumentReference myDiscoveryDocumentReference = new DiscoveryDocumentReference();

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


DiscoveryDocumentReference コンストラクタ (String)
アセンブリ: System.Web.Services (system.web.services.dll 内)


Dim myDiscoveryDocumentReference As New _ DiscoveryDocumentReference("http://localhost/Sample_vb.disco")
DiscoveryDocumentReference myDiscoveryDocumentReference = new DiscoveryDocumentReference( "http://localhost/Sample_cs.disco");
DiscoveryDocumentReference^ myDiscoveryDocumentReference = gcnew DiscoveryDocumentReference( "http://localhost/Sample_cpp.disco" );

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


DiscoveryDocumentReference コンストラクタ

名前 | 説明 |
---|---|
DiscoveryDocumentReference () | DiscoveryDocumentReference クラスの新しいインスタンスを初期化します。 |
DiscoveryDocumentReference (String) | DiscoveryDocumentReference クラスの新しいインスタンスを初期化し、Ref プロパティを href の値に設定します。 |

DiscoveryDocumentReference プロパティ

名前 | 説明 | |
---|---|---|
![]() | ClientProtocol | 探索処理で使用する DiscoveryClientProtocol のインスタンスを取得または設定します。 ( DiscoveryReference から継承されます。) |
![]() | DefaultFilename | オーバーライドされます。 参照先の探索ドキュメントを保存するときに使用する既定のファイル名を取得します。 |
![]() | Document | 参照される探索ドキュメントの内容を DiscoveryDocument オブジェクトとして取得します。 |
![]() | Ref | 探索ドキュメントへの参照を取得または設定します。 |
![]() | Url | オーバーライドされます。 参照される探索ドキュメントの場所を示す URL を取得または設定します。 |

DiscoveryDocumentReference メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | FilenameFromUrl | 渡された URL に基づいてファイル名を返します。 ( DiscoveryReference から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReadDocument | オーバーライドされます。 渡された Stream から探索ドキュメントを読み取って返します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | Resolve | Url にある参照されるドキュメントをダウンロードして、参照されるドキュメントが有効かどうかを解決します。 ( DiscoveryReference から継承されます。) |
![]() | ResolveAll | 探索ドキュメント内にあるすべての参照先ドキュメントが、有効かどうかを検証します。 |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |
![]() | WriteDocument | オーバーライドされます。 渡された Stream に渡された DiscoveryDocument を書き込みます。 |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

DiscoveryDocumentReference メンバ
探索ドキュメントへの参照を表します。このクラスは継承できません。
DiscoveryDocumentReference データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | ClientProtocol | 探索処理で使用する DiscoveryClientProtocol のインスタンスを取得または設定します。(DiscoveryReference から継承されます。) |
![]() | DefaultFilename | オーバーライドされます。 参照先の探索ドキュメントを保存するときに使用する既定のファイル名を取得します。 |
![]() | Document | 参照される探索ドキュメントの内容を DiscoveryDocument オブジェクトとして取得します。 |
![]() | Ref | 探索ドキュメントへの参照を取得または設定します。 |
![]() | Url | オーバーライドされます。 参照される探索ドキュメントの場所を示す URL を取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | FilenameFromUrl | 渡された URL に基づいてファイル名を返します。 (DiscoveryReference から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReadDocument | オーバーライドされます。 渡された Stream から探索ドキュメントを読み取って返します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | Resolve | Url にある参照されるドキュメントをダウンロードして、参照されるドキュメントが有効かどうかを解決します。 (DiscoveryReference から継承されます。) |
![]() | ResolveAll | 探索ドキュメント内にあるすべての参照先ドキュメントが、有効かどうかを検証します。 |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |
![]() | WriteDocument | オーバーライドされます。 渡された Stream に渡された DiscoveryDocument を書き込みます。 |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

- DiscoveryDocumentReferenceのページへのリンク