Freigeben über


SoapFaultBinding.Use-Eigenschaft

Gibt an, ob die Fehlermeldung unter Verwendung von Regeln codiert wurde, die durch die Encoding-Eigenschaft angegeben werden, oder in einem bestimmten XML-Schema gekapselt ist.

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

Syntax

'Declaration
Public Property Use As SoapBindingUse
'Usage
Dim instance As SoapFaultBinding
Dim value As SoapBindingUse

value = instance.Use

instance.Use = value
public SoapBindingUse Use { get; set; }
public:
property SoapBindingUse Use {
    SoapBindingUse get ();
    void set (SoapBindingUse value);
}
/** @property */
public SoapBindingUse get_Use ()

/** @property */
public void set_Use (SoapBindingUse value)
public function get Use () : SoapBindingUse

public function set Use (value : SoapBindingUse)

Eigenschaftenwert

Einer der SoapBindingUse-Werte. Der Standardwert ist Default.

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