Share via


SoapBodyBinding.Namespace Eigenschaft

Definition

Ruft den URI ab, der den Speicherort der Spezifikationen der Inhaltscodierung darstellt, die nicht ausdrücklich durch die Encoding-Eigenschaft festgelegt sind, oder legt diesen fest.

public:
 property System::String ^ Namespace { System::String ^ get(); void set(System::String ^ value); };
public string Namespace { get; set; }
member this.Namespace : string with get, set
Public Property Namespace As String

Eigenschaftswert

Eine Zeichenfolge, die einen URI enthält.

Beispiele

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="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);
Dim mySoapBodyBinding As 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 = "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)

Hinweise

Diese Eigenschaft gibt eine leere Zeichenfolge ("") zurück, wenn der Eigenschaftswert nicht festgelegt wurde. Der Wert sollte nur festgelegt werden, wenn der Wert der Use -Eigenschaft ist Encoded. Andernfalls wird der Eigenschaftswert ignoriert, was zu unerwartetem Verhalten des XML-Webdiensts führt.

Gilt für: