Skip to content

gozego/soap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Soap

Build Status

Pure Elixir implementation of SOAP client

NOTE: Library is NOT production ready before 1.0 version

Installation

  1. Add soap to your deps:
def deps do
  [{:soap, "~> 0.1.1"}]
end
  1. Add soap to the list of application dependencies
def application do
  [applications: [:logger, :soap]]
end
  1. Add configuration:
config :soap, :globals, version: "1.1"

config :soap, http_opts: [recv_timeout: 20_000, timeout: 20_000]

Usage

wsdl_path = "https://git.io/vNCWd"
action = "SendMessage"
params = %{recipient: "1", body: ""}

# Parse wsdl file for execution of action on its basis
{:ok, wsdl} = Soap.init_model(wsdl_path, :url)

# Call action
%Soap.Response{body: body, headers: headers, request_url: url, status_code: code} = Soap.call(wsdl, action, params)

# Parse body
Soap.Response.parse(body, code)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages