Lather.Server.ResponseBuilder (lather v1.1.0)

Copy Markdown View Source

Builds SOAP response XML from operation results.

Responses and faults can be rendered for SOAP 1.1 (default) or SOAP 1.2 via the :soap_version option; SOAP 1.2 uses the http://www.w3.org/2003/05/soap-envelope namespace and the Code/Value + Reason/Text fault structure.

Summary

Functions

Builds a SOAP fault response.

Builds a SOAP response envelope containing the operation result.

The MIME type for a response of the given SOAP version (text/xml for 1.1, application/soap+xml for 1.2).

Types

soap_version()

@type soap_version() :: :v1_1 | :v1_2

Functions

build_fault(fault, opts \\ [])

Builds a SOAP fault response.

The fault map may carry :fault_code, :fault_string and :detail (atom or string keys). For SOAP 1.2 the 1.1 codes Client/Server are mapped to soap:Sender/soap:Receiver.

Options

  • :soap_version - :v1_1 (default) or :v1_2

build_response(result, operation, opts \\ [])

Builds a SOAP response envelope containing the operation result.

Options

  • :soap_version - :v1_1 (default) or :v1_2

content_type(arg1)

@spec content_type(soap_version()) :: String.t()

The MIME type for a response of the given SOAP version (text/xml for 1.1, application/soap+xml for 1.2).