Freigeben über


SoapBinding.Namespace-Feld

Der XML-Namespace des Elements, das eine SOAP-Bindung innerhalb eines Discovery-Dokuments angibt.

Namespace: System.Web.Services.Discovery
Assembly: System.Web.Services (in system.web.services.dll)

Syntax

'Declaration
Public Const Namespace As String
'Usage
Dim value As String

value = SoapBinding.Namespace
public const string Namespace
public:
literal String^ Namespace
public static final String Namespace
public const var Namespace : String

Hinweise

SOAP-Bindungen befinden sich innerhalb eines Discovery-Dokuments in einem SOAP-XML-Element, das ein Member des durch die Namespace-Konstante angegebenen XML-Namespaces ist.

Beispiel

' '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")
// '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");
// 'dataservice.disco' is a sample discovery document.
String^ myStringUrl = "https://localhost/dataservice.disco";

// Call the Discover method to populate the Documents property.
DiscoveryClientProtocol^ myDiscoveryClientProtocol = gcnew DiscoveryClientProtocol;
myDiscoveryClientProtocol->Credentials = CredentialCache::DefaultCredentials;
DiscoveryDocument^ myDiscoveryDocument = myDiscoveryClientProtocol->Discover( myStringUrl );
Console::WriteLine( "Demonstrating the Discovery::SoapBinding class." );

// Create a SOAP binding.
SoapBinding^ mySoapBinding = gcnew 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 = gcnew 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: {0}", SoapBinding::Namespace );

// Write all the information of the DiscoveryClientProtocol.
myDiscoveryClientProtocol->WriteAll( ".", "results.discomap" );

Plattformen

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 unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

SoapBinding-Klasse
SoapBinding-Member
System.Web.Services.Discovery-Namespace