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

包含要写入的 SOAP 标头的 SoapHeaderCollection

mappings
SoapHeaderMapping[]

一个类型为 SoapHeaderMapping 的数组,它包含 SOAP 标头的映射。

direction
SoapHeaderDirection

一个 SoapHeaderDirection 值,它指示 SOAP 标头的方向。

isEncoded
Boolean

一个 Boolean,它指示是否对 SOAP 标头进行编码。

defaultNS
String

一个 String,其中包含 XML Web services 的默认命名空间。

serviceDefaultIsEncoded
Boolean

一个 Boolean,它指示默认情况下是否对发送到 XML Web services 或从 XML Web services 发送的数据进行编码。

envelopeNS
String

包含 SOAP 消息信封的命名空间的 String

适用于

另请参阅