Activity Forums Salesforce® Discussions What is fault element in SOAP message in Salesforce?

  • shradha jain

    Member
    July 30, 2018 at 6:28 am

    Hello Chanchal,

    When a Web service request is being processed, if an error is encountered, the nature of the error needs to be communicated to the client, or sender of the request. Because clients can be written on a variety of platforms using different languages, there must exist a standard, platform-independent mechanism for communicating the error.

    The SOAP specification defines a standard, platform-independent way of describing the error within the SOAP message using a SOAP fault. In general, a SOAP fault is analogous to an application exception. SOAP faults are generated by receivers to report business logic errors or unexpected conditions.

    The faults are returned to the sender only if request/response messaging is in use. If a Web service operation is configured as one-way, the SOAP fault is not returned to the sender, but stored for further processing.

    The SOAP <Fault> element is used to transmit error and status information within a SOAP message. The <Fault> element is a child of the body element. There can be only one <Fault> element in the body of a SOAP message.

    Subelements of the SOAP 1.2 <Fault> Element are:

    • env:Code - Information pertaining to the fault error code.
    • env:Value - Code value that provides more information about the fault.
    • env:Subcode - Subcode value that provides more information about the fault. This subelement can have a recursive structure.
    • env:Reason - Human-readable description of fault.
    • env:node - Information regarding the actor (SOAP node) that caused the fault
    • env:Role - Role being performed by actor at the time of the fault.
    • env:Detail - Application-specific information, such as the exception that was thrown.
  • madhulika shah

    Member
    September 19, 2018 at 1:04 pm

    Hi,

    SOAP - Fault. If an error occurs during processing, the response to a SOAP message is a SOAP fault element in the body of the message, and the fault is returned to the sender of the SOAP message.

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos