/// <summary> /// Serializes header of SOAP message. /// </summary> public static void WriteSoapHeader(this IXRoadProtocol protocol, XmlWriter writer, IXRoadHeader header, IEnumerable <XElement> additionalHeaders = null) { writer.WriteStartElement("Header", NamespaceConstants.SOAP_ENV); header?.WriteTo(writer, protocol); foreach (var additionalHeader in additionalHeaders ?? Enumerable.Empty <XElement>()) { additionalHeader.WriteTo(writer); } writer.WriteEndElement(); }
public virtual void WriteSoapHeader(XmlWriter writer, IXRoadHeader header, HeaderDefinition definition, IEnumerable <XElement> additionalHeaders = null) { writer.WriteStartElement("Header", NamespaceConstants.SOAP_ENV); header?.WriteTo(writer, this, definition); foreach (var additionalHeader in additionalHeaders ?? Enumerable.Empty <XElement>()) { additionalHeader.WriteTo(writer); } writer.WriteEndElement(); }