WebReference コンストラクタとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > WebReference コンストラクタの意味・解説 

WebReference コンストラクタ (DiscoveryClientDocumentCollection, CodeNamespace, String, String, String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

指定したデータ使用して、WebReference クラス新しインスタンス初期化します。

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

Public Sub New ( _
    documents As DiscoveryClientDocumentCollection, _
    proxyCode As CodeNamespace, _
    protocolName As String, _
    appSettingUrlKey As String, _
    appSettingBaseUrl As String _
)
Dim documents As DiscoveryClientDocumentCollection
Dim proxyCode As CodeNamespace
Dim protocolName As String
Dim appSettingUrlKey As String
Dim appSettingBaseUrl As String

Dim instance As New WebReference(documents,
 proxyCode, protocolName, appSettingUrlKey, appSettingBaseUrl)
public WebReference (
    DiscoveryClientDocumentCollection documents,
    CodeNamespace proxyCode,
    string protocolName,
    string appSettingUrlKey,
    string appSettingBaseUrl
)
public:
WebReference (
    DiscoveryClientDocumentCollection^ documents, 
    CodeNamespace^ proxyCode, 
    String^ protocolName, 
    String^ appSettingUrlKey, 
    String^ appSettingBaseUrl
)
public WebReference (
    DiscoveryClientDocumentCollection documents, 
    CodeNamespace proxyCode, 
    String protocolName, 
    String appSettingUrlKey, 
    String appSettingBaseUrl
)
public function WebReference (
    documents : DiscoveryClientDocumentCollection, 
    proxyCode : CodeNamespace, 
    protocolName : String, 
    appSettingUrlKey : String, 
    appSettingBaseUrl : String
)

パラメータ

documents

説明ドキュメントコレクション指定するDiscoveryClientDocumentCollection。

proxyCode

コード コンパイル名前空間指定する CodeNamespace。

protocolName

XML Web サービスによって使用されるプロトコル

appSettingUrlKey

Web 参照URL キー

appSettingBaseUrl

Web 参照ベース URL

解説解説

documents コレクションには、ServiceDescription オブジェクトおよび XmlSchema オブジェクトだけを含めます。これは、GenerateWebReferences メソッドが、DiscoveryDocument オブジェクト解釈できないからです。

使用例使用例

このコンストラクタ使用するコードの例次に示します

// Read in a WSDL service description.
string url = "http://www.contoso.com/Example/WebService.asmx?WSDL";
XmlTextReader reader = new XmlTextReader(url);
ServiceDescription wsdl = ServiceDescription.Read(reader);

// Create a WSDL collection.
DiscoveryClientDocumentCollection wsdlCollection = 
    new DiscoveryClientDocumentCollection();
wsdlCollection.Add(url, wsdl);

// Create a namespace.
CodeNamespace proxyNamespace = new CodeNamespace("ExampleNamespace");

// Create a web reference using the WSDL collection.
string baseUrl = "http://www.contoso.com";
string urlKey = "ExampleUrlKey";
string protocolName = "Soap12";
WebReference reference = new WebReference(
    wsdlCollection, proxyNamespace, protocolName, urlKey, baseUrl);

// Print some information about the web reference.
Console.WriteLine("The WebReference object contains {0} document(s).",
 
    reference.Documents.Count);
Console.WriteLine("The protocol name is {0}.", reference.ProtocolName);
Console.WriteLine("The base URL is {0}.", reference.AppSettingBaseUrl);
Console.WriteLine("The URL key is {0}.", reference.AppSettingUrlKey);

// Print some information about the proxy code namespace.
Console.WriteLine("The proxy code namespace is {0}.",
 
    reference.ProxyCode.Name);

// Print some information about the validation warnings.
Console.WriteLine("There are {0} validation warnings.",
    reference.ValidationWarnings.Count);

// Print some information about the warnings.
if (reference.Warnings == 0)
{
    Console.WriteLine("There are no warnings.");
}
else
{
    Console.WriteLine("Warnings: " + reference.Warnings);
}
// Read in a WSDL service description.
String url = "http://www.contoso.com/Example/WebService.asmx?WSDL";
XmlTextReader reader = new XmlTextReader(url);
ServiceDescription wsdl = ServiceDescription.Read(reader);

// Create a WSDL collection.
DiscoveryClientDocumentCollection wsdlCollection = 
    new DiscoveryClientDocumentCollection();
wsdlCollection.Add(url, wsdl);

// Create a namespace.
CodeNamespace proxyNamespace = new CodeNamespace("ExampleNamespace");

// Create a web reference using the WSDL collection.
String baseUrl = "http://www.contoso.com";
String urlKey = "ExampleUrlKey";
String protocolName = "Soap12";
WebReference reference = new WebReference(wsdlCollection, 
    proxyNamespace, protocolName, urlKey, baseUrl);

// Print some information about the web reference.
Console.WriteLine("The WebReference object contains {0} document(s).",
 
    System.Convert.ToString(reference.get_Documents().get_Count()));
Console.WriteLine("The protocol name is {0}.", 
    reference.get_ProtocolName());
Console.WriteLine("The base URL is {0}.", 
    reference.get_AppSettingBaseUrl());
Console.WriteLine("The URL key is {0}.", 
    reference.get_AppSettingUrlKey());

// Print some information about the proxy code namespace.
Console.WriteLine("The proxy code namespace is {0}.",
 
    reference.get_ProxyCode().get_Name());

// Print some information about the validation warnings.
Console.WriteLine("There are {0} validation warnings.", 
    System.Convert.ToString(reference.get_ValidationWarnings().
    get_Count()));

// Print some information about the warnings.
if (reference.get_Warnings().
    Equals((System.Web.Services.Description.
    ServiceDescriptionImportWarnings)0)) {
    Console.WriteLine("There are no warnings.");
}
else {
    Console.WriteLine("Warnings: " + reference.get_Warnings());
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WebReference クラス
WebReference メンバ
System.Web.Services.Description 名前空間

WebReference コンストラクタ (DiscoveryClientDocumentCollection, CodeNamespace)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

説明ドキュメントコレクションおよびプロキシ コード名前空間を指定して、WebReference クラス新しインスタンス初期化します。

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

Public Sub New ( _
    documents As DiscoveryClientDocumentCollection, _
    proxyCode As CodeNamespace _
)
Dim documents As DiscoveryClientDocumentCollection
Dim proxyCode As CodeNamespace

Dim instance As New WebReference(documents,
 proxyCode)
public WebReference (
    DiscoveryClientDocumentCollection documents,
    CodeNamespace proxyCode
)
public:
WebReference (
    DiscoveryClientDocumentCollection^ documents, 
    CodeNamespace^ proxyCode
)
public WebReference (
    DiscoveryClientDocumentCollection documents, 
    CodeNamespace proxyCode
)
public function WebReference (
    documents : DiscoveryClientDocumentCollection, 
    proxyCode : CodeNamespace
)

パラメータ

documents

説明ドキュメントコレクション指定するDiscoveryClientDocumentCollection。

proxyCode

コード コンパイル名前空間指定する CodeNamespace。

解説解説

documents コレクションには、ServiceDescription オブジェクトおよび XmlSchema オブジェクトだけを含めます。これは、GenerateWebReferences メソッドが、DiscoveryDocument オブジェクト解釈できないからです。

使用例使用例

このコンストラクタ使用方法を示すコードの例次に示します。このコード例は、WebReference クラストピック取り上げているコード例一部分です。

// Create a web referernce using the WSDL collection.
WebReference reference = new WebReference(wsdlCollection, space);
reference.ProtocolName = "Soap12";
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WebReference クラス
WebReference メンバ
System.Web.Services.Description 名前空間

WebReference コンストラクタ (DiscoveryClientDocumentCollection, CodeNamespace, String, String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

指定したデータ使用して、WebReference クラス新しインスタンス初期化します。

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

Public Sub New ( _
    documents As DiscoveryClientDocumentCollection, _
    proxyCode As CodeNamespace, _
    appSettingUrlKey As String, _
    appSettingBaseUrl As String _
)
Dim documents As DiscoveryClientDocumentCollection
Dim proxyCode As CodeNamespace
Dim appSettingUrlKey As String
Dim appSettingBaseUrl As String

Dim instance As New WebReference(documents,
 proxyCode, appSettingUrlKey, appSettingBaseUrl)
public WebReference (
    DiscoveryClientDocumentCollection documents,
    CodeNamespace proxyCode,
    string appSettingUrlKey,
    string appSettingBaseUrl
)
public:
WebReference (
    DiscoveryClientDocumentCollection^ documents, 
    CodeNamespace^ proxyCode, 
    String^ appSettingUrlKey, 
    String^ appSettingBaseUrl
)
public WebReference (
    DiscoveryClientDocumentCollection documents, 
    CodeNamespace proxyCode, 
    String appSettingUrlKey, 
    String appSettingBaseUrl
)
public function WebReference (
    documents : DiscoveryClientDocumentCollection, 
    proxyCode : CodeNamespace, 
    appSettingUrlKey : String, 
    appSettingBaseUrl : String
)

パラメータ

documents

説明ドキュメントコレクション指定するDiscoveryClientDocumentCollection。

proxyCode

コード コンパイル名前空間指定する CodeNamespace。

appSettingUrlKey

Web 参照URL キー

appSettingBaseUrl

Web 参照ベース URL

解説解説

documents コレクションには、ServiceDescription オブジェクトおよび XmlSchema オブジェクトだけを含めます。これは、GenerateWebReferences メソッドが、DiscoveryDocument オブジェクト解釈できないからです。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WebReference クラス
WebReference メンバ
System.Web.Services.Description 名前空間

WebReference コンストラクタ

WebReference クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
WebReference (DiscoveryClientDocumentCollection, CodeNamespace) 説明ドキュメントコレクションおよびプロキシ コード名前空間を指定してWebReference クラス新しインスタンス初期化します。
WebReference (DiscoveryClientDocumentCollection, CodeNamespace, String, String) 指定したデータ使用してWebReference クラス新しインスタンス初期化します。
WebReference (DiscoveryClientDocumentCollection, CodeNamespace, String, String, String) 指定したデータ使用してWebReference クラス新しインスタンス初期化します。
参照参照

関連項目

WebReference クラス
WebReference メンバ
System.Web.Services.Description 名前空間



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

辞書ショートカット

すべての辞書の索引

「WebReference コンストラクタ」の関連用語

WebReference コンストラクタのお隣キーワード
検索ランキング

   

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



WebReference コンストラクタのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS