Поделиться через


startHeader, endHeader, startHeaderElement, and endHeaderElement Methods (Windows Embedded CE 6.0)

1/6/2010

These methods create a <Header> element for a SOAP message.

These four methods work together in the following way:

  • The startHeader method indicates the beginning of a <Header> element.
  • The startHeaderElement method indicates the beginning of a child element of the <Header> element.
  • The endHeaderElement method indicates the end of a child element of the <Header> element.
  • The endHeader method indicates the end of the <Header> element.

This <Header> element is optional. Therefore, if you do not call these methods when building a SOAP message, the SOAP message does not have a header.

Syntax

HRESULT startHeader( 
  BSTR enc_style_uri 
);
HRESULT startHeaderElement( 
  BSTR name,
  BSTR ns_uri,
  int mustUnderstand,
  BSTR actor_uri,
  BSTR enc_style_uri,
  BSTR prefix
);
HRESULT endHeaderElement(void);
HRESULT endHeader (void);

Parameters

  • enc_style_uri
    [in] Optional. Value of the Universal Resource Identifier (URI) for the encodingStyle attribute of the <Header> element. The following values have special meaning when assigned to this parameter.

    Value Description

    NONE

    Default. Use this value if you do not want encodingStyle attribute generated in <Header> element.

    STANDARD

    Use this value if you want to generate encodingStyle attribute with the default encoding style in the <Header> element.

  • name
    [in] Name of the <Header> element.
  • ns_uri
    [in] Optional. Universal Resource Identifier (URI) for the namespace of the <Header> element. The default is "". If this parameter is missing or is an empty string, the element is in the default namespace.
  • mustUnderstand
    [in] Optional. An integer that indicates whether the SOAP server must understand and be capable of processing a <Header> element. The default is 0. If set to 1, then the SOAP server must be able to process a <Header> element. If the server does not understand the header, it must return a <Fault> element in the SOAP message to the client. If this parameter is missing or is 0, the <Header> element does not include the mustUnderstand attribute.
  • actor_uri
    [in] Optional. Value of the actor attribute of the <Header> element. The default value is "". If this parameter is missing or is an empty string, the <Header> element does not include an actor attribute.
  • prefix
    [in] Optional. Namespace prefix used for the element. The default is "". If this parameter is missing or is an empty string, the application generates a namespace prefix as needed.

Return Value

The following table describes the common return values.

Value Description

S_OK

Success.

E_NOTIMPL

The function contains no implementation.

E_OUTOFMEMORY

Out of memory.

Remarks

For additional information on setting encoding style, see startEnvelope and endEnvelope Methods.

Requirements

Header mssoap.h
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

ISoapSerializer