SoapBinding.Namespace フィールド
探索ドキュメント内の SOAP バインディングを指定する要素の XML 名前空間。
Public Const Namespace As String
[C#]
public const string Namespace;
[C++]
public: const String* Namespace;
[JScript]
public var Namespace : String;
解説
探索ドキュメント内の SOAP バインディングは、 Namespace 定数で指定される XML 名前空間のメンバである SOAP XML 要素内にあります。
使用例
' 'dataservice.disco' is a sample discovery document.
Dim myStringUrl As String = "https://localhost/dataservice.disco"
' Call the Discover method to populate the Documents property.
Dim myDiscoveryClientProtocol As DiscoveryClientProtocol = _
New DiscoveryClientProtocol()
myDiscoveryClientProtocol.Credentials = _
CredentialCache.DefaultCredentials
Dim myDiscoveryDocument As DiscoveryDocument = _
myDiscoveryClientProtocol.Discover(myStringUrl)
Console.WriteLine("Demonstrating the Discovery.SoapBinding class.")
' Create a SOAP binding.
Dim mySoapBinding As SoapBinding = New SoapBinding()
' Assign the address to the SOAP binding.
mySoapBinding.Address = "https://schemas.xmlsoap.org/disco/scl/"
' Bind the created SOAP binding with a new XmlQualifiedName.
mySoapBinding.Binding = New XmlQualifiedName("string", _
"http://www.w3.org/2001/XMLSchema")
' Add the created SOAP binding to the DiscoveryClientProtocol.
myDiscoveryClientProtocol.AdditionalInformation.Add(mySoapBinding)
' Display the namespace associated with the SOAP binding.
Console.WriteLine("Namespace associated with Soap Binding is: " _
+ SoapBinding.Namespace)
' Write all the information of the DiscoveryClientProtocol.
myDiscoveryClientProtocol.WriteAll(".","results.discomap")
[C#]
// 'dataservice.disco' is a sample discovery document.
string myStringUrl = "https://localhost/dataservice.disco";
// Call the Discover method to populate the Documents property.
DiscoveryClientProtocol myDiscoveryClientProtocol =
new DiscoveryClientProtocol();
myDiscoveryClientProtocol.Credentials =
CredentialCache.DefaultCredentials;
DiscoveryDocument myDiscoveryDocument =
myDiscoveryClientProtocol.Discover(myStringUrl);
Console.WriteLine("Demonstrating the Discovery.SoapBinding class.");
// Create a SOAP binding.
SoapBinding mySoapBinding = new SoapBinding();
// Assign an address to the created SOAP binding.
mySoapBinding.Address = "https://schemas.xmlsoap.org/disco/scl/";
// Bind the created SOAP binding with a new XmlQualifiedName.
mySoapBinding.Binding = new XmlQualifiedName("string",
"http://www.w3.org/2001/XMLSchema");
// Add the created SOAP binding to the DiscoveryClientProtocol.
myDiscoveryClientProtocol.AdditionalInformation.Add(mySoapBinding);
// Display the namespace associated with SOAP binding.
Console.WriteLine("Namespace associated with the SOAP binding is: "
+ SoapBinding.Namespace);
// Write all the information of the DiscoveryClientProtocol.
myDiscoveryClientProtocol.WriteAll(".","results.discomap");
[C++]
// 'dataservice.disco' is a sample discovery document.
String* myStringUrl = S"https://localhost/dataservice.disco";
// Call the Discover method to populate the Documents property.
DiscoveryClientProtocol* myDiscoveryClientProtocol =
new DiscoveryClientProtocol();
myDiscoveryClientProtocol->Credentials =
CredentialCache::DefaultCredentials;
DiscoveryDocument* myDiscoveryDocument =
myDiscoveryClientProtocol->Discover(myStringUrl);
Console::WriteLine(S"Demonstrating the Discovery::SoapBinding class.");
// Create a SOAP binding.
SoapBinding* mySoapBinding = new SoapBinding();
// Assign an address to the created SOAP binding.
mySoapBinding->Address = S"https://schemas.xmlsoap.org/disco/scl/";
// Bind the created SOAP binding with a new XmlQualifiedName.
mySoapBinding->Binding = new XmlQualifiedName(S"String*",
S"http://www.w3.org/2001/XMLSchema");
// Add the created SOAP binding to the DiscoveryClientProtocol.
myDiscoveryClientProtocol->AdditionalInformation->Add(mySoapBinding);
// Display the namespace associated with SOAP binding.
Console::WriteLine(S"Namespace associated with the SOAP binding is: {0}",
SoapBinding::Namespace);
// Write all the information of the DiscoveryClientProtocol.
myDiscoveryClientProtocol->WriteAll(S".", S"results.discomap");
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
SoapBinding クラス | SoapBinding メンバ | System.Web.Services.Discovery 名前空間