共用方式為


SoapHeaderHandling.WriteHeaders 方法

定義

將指定的 SOAP 標頭內容寫入 SOAP 訊息。

public:
 static void WriteHeaders(System::Xml::XmlWriter ^ writer, System::Xml::Serialization::XmlSerializer ^ serializer, System::Web::Services::Protocols::SoapHeaderCollection ^ headers, cli::array <System::Web::Services::Protocols::SoapHeaderMapping ^> ^ mappings, System::Web::Services::Protocols::SoapHeaderDirection direction, bool isEncoded, System::String ^ defaultNS, bool serviceDefaultIsEncoded, System::String ^ envelopeNS);
public static void WriteHeaders (System.Xml.XmlWriter writer, System.Xml.Serialization.XmlSerializer serializer, System.Web.Services.Protocols.SoapHeaderCollection headers, System.Web.Services.Protocols.SoapHeaderMapping[] mappings, System.Web.Services.Protocols.SoapHeaderDirection direction, bool isEncoded, string defaultNS, bool serviceDefaultIsEncoded, string envelopeNS);
static member WriteHeaders : System.Xml.XmlWriter * System.Xml.Serialization.XmlSerializer * System.Web.Services.Protocols.SoapHeaderCollection * System.Web.Services.Protocols.SoapHeaderMapping[] * System.Web.Services.Protocols.SoapHeaderDirection * bool * string * bool * string -> unit
Public Shared Sub WriteHeaders (writer As XmlWriter, serializer As XmlSerializer, headers As SoapHeaderCollection, mappings As SoapHeaderMapping(), direction As SoapHeaderDirection, isEncoded As Boolean, defaultNS As String, serviceDefaultIsEncoded As Boolean, envelopeNS As String)

參數

writer
XmlWriter

XmlWriter,用於撰寫標頭。

serializer
XmlSerializer

XmlSerializer,用於撰寫標頭。

headers
SoapHeaderCollection

SoapHeaderCollection,其中包含要撰寫的 SOAP 標頭。

mappings
SoapHeaderMapping[]

SoapHeaderMapping 型別的陣列,其中包含 SOAP 標頭的對應。

direction
SoapHeaderDirection

SoapHeaderDirection 值,表示 SOAP 標頭的方向。

isEncoded
Boolean

Boolean,指出 SOAP 標頭是否已編碼。

defaultNS
String

String,包含 XML Web Service 的預設命名空間。

serviceDefaultIsEncoded
Boolean

Boolean,指出 XML Web Service 往返傳送的資料是否預設為已經過編碼。

envelopeNS
String

String,其中包含 SOAP 訊息信封的命名空間。

適用於

另請參閱