SoapBinding.Address Propiedad

Definición

Obtiene o establece la dirección URL del servicio Web XML que implementa el enlace SOAP.

C#
public string Address { get; set; }

Valor de propiedad

Dirección URL del servicio Web XML que implementa el enlace SOAP. El valor predeterminado es Empty.

Ejemplos

C#
// '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");

Se aplica a

Produto Versións
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1