SoapAddressBinding.Location Property

Gets or sets a value representing the URI for the Port to which the SoapAddressBinding applies.

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

public:
property String^ Location {
	String^ get ();
	void set (String^ value);
}
/** @property */
public String get_Location ()

/** @property */
public void set_Location (String value)

public function get Location () : String

public function set Location (value : String)

Not applicable.

Property Value

A string containing a URI. The default value is an empty string ("").

Port^ soapPort = gcnew Port;
soapPort->Name = "Service1Soap";
soapPort->Binding = gcnew XmlQualifiedName( "s0:Service1Soap" );

// Create a 'SoapAddressBinding' object for the 'SOAP' protocol.
SoapAddressBinding^ mySoapAddressBinding = gcnew SoapAddressBinding;
mySoapAddressBinding->Location = "http://localhost/Service1_cs.asmx";

// Add the 'SoapAddressBinding' object to the 'Port'.
soapPort->Extensions->Add( mySoapAddressBinding );

// Add the 'Port' object to the ServiceDescription instance.
myDescription->Services[ 0 ]->Ports->Add( soapPort );

Port soapPort = new Port();
soapPort.set_Name("Service1Soap");
soapPort.set_Binding(new XmlQualifiedName("s0:Service1Soap"));
// Create a 'SoapAddressBinding' object for the 'SOAP' protocol.
SoapAddressBinding mySoapAddressBinding = new SoapAddressBinding();
mySoapAddressBinding.set_Location("http://localhost/Service1_jsl.asmx");
// Add the 'SoapAddressBinding' object to the 'Port'.
soapPort.get_Extensions().Add(mySoapAddressBinding);
// Add the 'Port' object to the ServiceDescription instance.
myDescription.get_Services().get_Item(0).get_Ports().Add(soapPort);

Windows 98, Windows Server 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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: