Skip to content

SOAPFault

do- edited this page Dec 8, 2022 · 8 revisions

A lightweight object to represent SOAP faults in a version agnostic manner.

const {SOAP11, SOAPFault} = require ('xml-toolkit')

try {
// do something
}
catch (xxx) {

//const fault = new SOAPFault (xxx) // too easy
  
  const fault = new SOAPFault (xxx.message, {
    actor:  'Client',
    detail: '<id>1</id>',
  })

  const response = SOAP11.message (fault)

  sendOutSomehow (response)

}

Constructor

Clone this wiki locally