Soap v0.2.0 Soap View Source

Provides a functions for send SOAP requests.

Link to this section Summary

Functions

Sends a request to the SOAP server based on the passed wsdl_model, action and parameters

Initialization of a WSDL model. Response a map of parsed data from file

Returns a list of available actions of the passed WSDL

Link to this section Functions

Link to this function

call(wsdl, operation, params, headers \\ [], opts \\ []) View Source
call(
  wsdl :: map(),
  operation :: String.t(),
  params :: map(),
  headers :: any(),
  opts :: any()
) :: any()

Sends a request to the SOAP server based on the passed wsdl_model, action and parameters.

Parameters

  • wsdl: Wsdl model from Soap.init_model/2 function.
  • action: Soap action to be called.
  • params: Parameters for build the body of a XML request.
  • headers: Custom request headers.
Link to this function

init_model(path, type \\ :file) View Source
init_model(String.t(), :file | :url) :: {:ok, map()}

Initialization of a WSDL model. Response a map of parsed data from file.

Parameters

  • path: Path for wsdl file.
  • type: Atom that represents the type of path for WSDL file. Can be :file or url. Default: :file.

Examples

iex> {:ok, wsdl} = Soap.init_model("https://git.io/vNCWd", :url)
{:ok, %{...}}
Link to this function

operations(wsdl) View Source
operations(map()) :: [String.t(), ...]

Returns a list of available actions of the passed WSDL.

Parameters

Examples

iex> {:ok, wsdl} = Soap.init_model("https://git.io/vNCWd", :url)
iex> Soap.operations(wsdl)
["SendMessage", "SendMessageMultipleRecipients"]