This documentation is archived and is not being maintained.

SoapBodyBinding::Namespace Property

Get or sets the URI representing the location of the specifications for encoding of content not specifically defined by the Encoding property.

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

public:
property String^ Namespace {
	String^ get ();
	void set (String^ value);
}

Property Value

Type: System::String
A string containing a URI.

This property will return an empty string ("") if the property value has not been set. The value should only be set if the value of the Use property is Encoded. Otherwise the property value will be ignored, thus leading to unexpected behavior by the XML Web service.

SoapBodyBinding^ mySoapBodyBinding = gcnew SoapBodyBinding;
// Encode SOAP body using rules specified by the 'Encoding' property.
mySoapBodyBinding->Use = SoapBindingUse::Encoded;
// Set URI representing the encoding style for encoding the body.
mySoapBodyBinding->Encoding = "http://schemas.xmlsoap.org/soap/encoding/";
// Set the Uri representing the location of the specification 
// for encoding of content not defined by 'Encoding' property'.
mySoapBodyBinding->Namespace = "http://tempuri.org/soapsvcmgr/";
myInputBinding->Extensions->Add( mySoapBodyBinding );
SoapBodyBinding* mySoapBodyBinding = new SoapBodyBinding();
// Encode SOAP body using rules specified by the 'Encoding' property.
mySoapBodyBinding->Use = SoapBindingUse::Encoded;
// Set URI representing the encoding style for encoding the body.
mySoapBodyBinding->Encoding=S"http://schemas.xmlsoap.org/soap/encoding/";
// Set the Uri representing the location of the specification
// for encoding of content not defined by 'Encoding' property'.
mySoapBodyBinding->Namespace=S"http://tempuri.org/soapsvcmgr/";
myInputBinding->Extensions->Add(mySoapBodyBinding);

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: