WebReference コンストラクタ (DiscoveryClientDocumentCollection, CodeNamespace, String, String, String)
アセンブリ: 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 )
- protocolName
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()); }
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
WebReference コンストラクタ (DiscoveryClientDocumentCollection, CodeNamespace)
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文
Dim documents As DiscoveryClientDocumentCollection Dim proxyCode As CodeNamespace Dim instance As New WebReference(documents, proxyCode)
public function WebReference ( documents : DiscoveryClientDocumentCollection, proxyCode : CodeNamespace )
documents コレクションには、ServiceDescription オブジェクトおよび XmlSchema オブジェクトだけを含めます。これは、GenerateWebReferences メソッドが、DiscoveryDocument オブジェクトを解釈できないからです。
プラットフォーム
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
WebReference コンストラクタ (DiscoveryClientDocumentCollection, CodeNamespace, String, String)
アセンブリ: 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 コレクションには、ServiceDescription オブジェクトおよび XmlSchema オブジェクトだけを含めます。これは、GenerateWebReferences メソッドが、DiscoveryDocument オブジェクトを解釈できないからです。
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
WebReference コンストラクタ
オーバーロードの一覧
名前 | 説明 |
---|---|
WebReference (DiscoveryClientDocumentCollection, CodeNamespace) | 説明のドキュメントのコレクションおよびプロキシ コード名前空間を指定して、WebReference クラスの新しいインスタンスを初期化します。 |
WebReference (DiscoveryClientDocumentCollection, CodeNamespace, String, String) | 指定したデータを使用して、WebReference クラスの新しいインスタンスを初期化します。 |
WebReference (DiscoveryClientDocumentCollection, CodeNamespace, String, String, String) | 指定したデータを使用して、WebReference クラスの新しいインスタンスを初期化します。 |
- WebReference コンストラクタのページへのリンク