Compartilhar via


startHeader, endHeader, startHeaderElement, and endHeaderElement Methods (Windows CE 5.0)

Send Feedback

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.

HRESULT startHeader( BSTRenc_style_uri);HRESULT startHeaderElement( BSTRname,BSTRns_uri,intmustUnderstand,BSTRactor_uri,BSTRenc_style_uri,BSTRprefix);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 Values

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

OS Versions: Windows CE .NET 4.0 and later.
Header: Mssoap.h.
Link Library: Uuid.lib.

See Also

ISoapSerializer

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.