ContractReference.ReadDocument メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ContractReference.ReadDocument メソッドの意味・解説 

ContractReference.ReadDocument メソッド

渡されStream からサービス説明読み取りサービス説明返します

名前空間: System.Web.Services.Discovery
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Public Overrides Function
 ReadDocument ( _
    stream As Stream _
) As Object
Dim instance As ContractReference
Dim stream As Stream
Dim returnValue As Object

returnValue = instance.ReadDocument(stream)
public Object ReadDocument (
    Stream stream
)

パラメータ

stream

サービス説明含んでいる Stream

戻り値
参照されるサービス説明内容含んでいる ServiceDescription。

使用例使用例
Class MyClass1
   
   Shared Sub Main()
      Try
         ' Create the file stream.
         Dim wsdlStream As _
             New FileStream("MyService1_vb.wsdl",
 FileMode.Open)
         Dim myContractReference As New
 ContractReference()

         ' Read the service description from the passed stream.
         Dim myServiceDescription As ServiceDescription
 = _
             CType(myContractReference.ReadDocument(wsdlStream), _
             ServiceDescription)
         Console.Write(("Target Namesapce for the service description
 is: " _
             + myServiceDescription.TargetNamespace))
         wsdlStream.Close()

      Catch e As Exception
         Console.WriteLine(("Exception: " + e.Message))
      End Try
   End Sub 'Main
End Class 'MyClass1
class MyClass1
{
   static void Main()
   {
      try
      {
         // Create the file stream.
         FileStream wsdlStream = new FileStream("MyService1_cs.wsdl"
,
             FileMode.Open);
         ContractReference myContractReference=new ContractReference();

         // Read the service description from the passed stream.
         ServiceDescription myServiceDescription=
             (ServiceDescription)myContractReference.ReadDocument(wsdlStream);
         Console.Write("Target Namespace for the service
 description is: "
             + myServiceDescription.TargetNamespace);
         wsdlStream.Close();
      }
      catch(Exception e)
      {
         Console.WriteLine("Exception: "+e.Message);
      }
   }
}
int main()
{
   try
   {
      // Create the file stream.
      FileStream^ wsdlStream = gcnew FileStream( "MyService1_cpp.wsdl",FileMode::Open
 );
      ContractReference^ myContractReference = gcnew ContractReference;
      
      // Read the service description from the passed stream.
      ServiceDescription^ myServiceDescription = dynamic_cast<ServiceDescription^>(myContractReference->ReadDocument(
 wsdlStream ));
      Console::Write( "Target Namespace for the service description
 is: {0}", myServiceDescription->TargetNamespace );
      wsdlStream->Close();
   }
   catch ( Exception^ e ) 
   {
      Console::WriteLine( "Exception: {0}", e->Message );
   }
}
class MyClass1
{
    public static void main(String[]
 args)
    {
        try {
            // Create the file stream.
            FileStream wsdlStream = new FileStream("MyService1_jsl.wsdl",
 
                FileMode.Open);
            ContractReference myContractReference = new ContractReference();

            // Read the service description from the passed stream.
            ServiceDescription myServiceDescription = (ServiceDescription)
                myContractReference.ReadDocument(wsdlStream);
            Console.Write("Target Namespace for the service
 description is: " 
                + myServiceDescription.get_TargetNamespace());
            wsdlStream.Close();
        }
        catch (System.Exception e) {
            Console.WriteLine("Exception: " + e.get_Message());
        }
    } //main
} //MyClass1
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ContractReference クラス
ContractReference メンバ
System.Web.Services.Discovery 名前空間
Stream
ServiceDescription クラス
DiscoveryClientProtocol
ReadAll


このページでは「.NET Framework クラス ライブラリ リファレンス」からContractReference.ReadDocument メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からContractReference.ReadDocument メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からContractReference.ReadDocument メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

ContractReference.ReadDocument メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ContractReference.ReadDocument メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS