WSDGenerateFault function

Generates a SOAP fault.

Syntax


HRESULT WSDGenerateFault(
  _In_  const LPCWSTR        *pszCode,
  _In_  const LPCWSTR        *pszSubCode,
  _In_  const LPCWSTR        *pszReason,
  _In_  const LPCWSTR        *pszDetail,
  _In_        IWSDXMLContext *pContext,
  _Out_       WSD_SOAP_FAULT **ppFault
);

Parameters

pszCode [in]

A SOAP fault code.

The list of possible fault codes follows. For a description of each fault code, see the SOAP Version 1.2 specification.

VersionMismatch
MustUnderstand
DataEncodingUnknown
Sender
Receiver
pszSubCode [in]

A fault subcode.

pszReason [in]

A human readable explanation of the fault.

pszDetail [in]

Contains application-specific error information pertaining to the fault.

pContext [in]

An IWSDXMLContext interface that represents the context in which to generate the fault.

ppFault [out]

A WSD_SOAP_FAULT structure that contains the generated fault. When the calling application is done with this data, ppFault must be freed with a call to WSDFreeLinkedMemory.

Return value

Possible return values include, but are not limited to, the following:

Return codeDescription
S_OK

Method completed successfully.

E_INVALIDARG

pszCode, pszReason, or pContext is NULL.

E_POINTER

ppFault is NULL.

 

Remarks

SOAP faults provide a way to communicate error information on failed SOAP messages. Different Web Services protocols extend faults to provide contextual error information, and in some cases, like in WS-Eventing, faults are an expected part of specific message patterns as the client determines whether or not the device supports specific features.

The following fault subcodes are not implemented by WSDAPI:

  • InvalidMessageInformationHeader
  • MessageInformationHeaderRequired
  • UnsupportedExpirationType
  • InvalidMessage
  • FilteringNotSupported

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

WsdUtil.h (include Wsdapi.h)

Library

Wsdapi.lib

DLL

Wsdapi.dll

 

 

Community Additions

ADD
Show: