This documentation is archived and is not being maintained.

SoapBinding.Address Property

Gets or sets the URL of the XML Web service implementing the SOAP binding.

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

public string Address { get; set; }

Property Value

Type: System.String
The URL of the XML Web service implementing the SOAP binding. The default value is Empty.

// 'dataservice.disco' is a sample discovery document.
string myStringUrl = "http://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 = "http://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 = S"http://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"http://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");

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Show: