Freigeben über


SoapFaultBinding.Namespace-Eigenschaft

Ruft den URI ab, der den Speicherort der Spezifikation für die Codierung von Inhalt darstellt, der nicht ausdrücklich durch die Encoding-Eigenschaft festgelegt ist, oder legt diesen URI fest.

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

Syntax

'Declaration
Public Property Namespace As String
'Usage
Dim instance As SoapFaultBinding
Dim value As String

value = instance.Namespace

instance.Namespace = value
public string Namespace { get; set; }
public:
property String^ Namespace {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_Namespace ()

/** @property */
public void set_Namespace (String value)
public function get Namespace () : String

public function set Namespace (value : String)

Eigenschaftenwert

Eine Zeichenfolge, die einen URI darstellt.

Hinweise

Diese Eigenschaft gibt eine leere Zeichenfolge ("") zurück, wenn der Eigenschaftenwert nicht festgelegt wurde. Der Wert darf nur dann festgelegt werden, wenn der Wert der Use-Eigenschaft Encoded ist. Andernfalls zeigt der XML-Webdienst unerwartetes Verhalten.

Beispiel

' Create a new instance of 'SoapFaultBinding' class.
Dim mySoapFaultBinding As New SoapFaultBinding()
' Encode fault message using rules specified by 'Encoding' property.
mySoapFaultBinding.Use = SoapBindingUse.Encoded
' Set the URI representing the encoding style.
mySoapFaultBinding.Encoding = "http://tempuri.org/stockquote"
' Set the URI representing the location of the specification 
' for encoding of content not defined by 'Encoding' property'.
mySoapFaultBinding.Namespace = "http://tempuri.org/stockquote"
' Create a new instance of 'FaultBinding'.
Dim myFaultBinding As New FaultBinding()
myFaultBinding.Name = "AddFaultbinding"
myFaultBinding.Extensions.Add(mySoapFaultBinding)
' Get existing 'OperationBinding' object.
myOperationBinding.Faults.Add(myFaultBinding)
myBinding.Operations.Add(myOperationBinding)
// Create a new instance of 'SoapFaultBinding' class.
SoapFaultBinding mySoapFaultBinding=new SoapFaultBinding();
// Encode fault message using rules specified by 'Encoding' property.
mySoapFaultBinding.Use=SoapBindingUse.Encoded;
// Set the URI representing the encoding style.
mySoapFaultBinding.Encoding="http://tempuri.org/stockquote";
// Set the URI representing the location of the specification 
// for encoding of content not defined by 'Encoding' property'.
mySoapFaultBinding.Namespace="http://tempuri.org/stockquote";
// Create a new instance of 'FaultBinding'.
FaultBinding myFaultBinding=new FaultBinding();
myFaultBinding.Name="AddFaultbinding";
myFaultBinding.Extensions.Add(mySoapFaultBinding);
// Get existing 'OperationBinding' object.
myOperationBinding.Faults.Add(myFaultBinding);
myBinding.Operations.Add(myOperationBinding);
// Create a new instance of 'SoapFaultBinding' class.
SoapFaultBinding^ mySoapFaultBinding = gcnew SoapFaultBinding;

// Encode fault message using rules specified by 'Encoding' property.
mySoapFaultBinding->Use = SoapBindingUse::Encoded;

// Set the URI representing the encoding style.
mySoapFaultBinding->Encoding = "http://tempuri.org/stockquote";

// Set the URI representing the location of the specification
// for encoding of content not defined by 'Encoding' property'.
mySoapFaultBinding->Namespace = "http://tempuri.org/stockquote";

// Create a new instance of 'FaultBinding'.
FaultBinding^ myFaultBinding = gcnew FaultBinding;
myFaultBinding->Name = "AddFaultbinding";
myFaultBinding->Extensions->Add( mySoapFaultBinding );

// Get existing 'OperationBinding' object.
myOperationBinding->Faults->Add( myFaultBinding );
myBinding->Operations->Add( myOperationBinding );
// Create a new instance of 'SoapFaultBinding' class.
SoapFaultBinding mySoapFaultBinding = new SoapFaultBinding();
// Encode fault message using rules specified by 'Encoding' 
// property.
mySoapFaultBinding.set_Use(SoapBindingUse.Encoded);
// Set the URI representing the encoding style.
mySoapFaultBinding.set_Encoding("http://tempuri.org/stockquote");
// Set the URI representing the location of the specification 
// for encoding of content not defined by 'Encoding' property'.
mySoapFaultBinding.set_Namespace("http://tempuri.org/stockquote");
// Create a new instance of 'FaultBinding'.
FaultBinding myFaultBinding = new FaultBinding();
myFaultBinding.set_Name("AddFaultbinding");
myFaultBinding.get_Extensions().Add(mySoapFaultBinding);
// Get existing 'OperationBinding' object.
myOperationBinding.get_Faults().Add(myFaultBinding);
myBinding.get_Operations().Add(myOperationBinding);

Plattformen

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

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

SoapFaultBinding-Klasse
SoapFaultBinding-Member
System.Web.Services.Description-Namespace