Udostępnij za pośrednictwem


SoapFaultBinding.Use Właściwość

Definicja

Określa, czy komunikat o błędzie jest kodowany przy użyciu reguł określonych przez Encoding właściwość, czy jest hermetyzowany w konkretnym schemacie XML.

public:
 property System::Web::Services::Description::SoapBindingUse Use { System::Web::Services::Description::SoapBindingUse get(); void set(System::Web::Services::Description::SoapBindingUse value); };
public System.Web.Services.Description.SoapBindingUse Use { get; set; }
member this.Use : System.Web.Services.Description.SoapBindingUse with get, set
Public Property Use As SoapBindingUse

Wartość właściwości

Jedna z SoapBindingUse wartości. Wartość domyślna to Default.

Przykłady

// 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.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.
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)

Dotyczy