Liking cljdoc? Tell your friends :D

wagoe.external.core.soap

Pure functions for the SOAP 1.1 client: operation settings, the request envelope, reading the response or fault, which failures to retry and error values. No I/O.

The shell parses XML into elements of this shape, and serialises nothing: the envelope is built here as a string.

{:name "GetListsResult" :ns "http://tempuri.org/" :nil? false :text "" :children [element ...]}

Pure functions for the SOAP 1.1 client: operation settings, the request
envelope, reading the response or fault, which failures to retry and error
values. No I/O.

The shell parses XML into elements of this shape, and serialises nothing:
the envelope is built here as a string.

  {:name "GetListsResult" :ns "http://tempuri.org/"
   :nil? false :text "" :children [element ...]}
raw docstring

arrays-nsclj

source

element-keyclj

(element-key el-name)

The kebab-case keyword for an element name: ListEntries -> :list-entries.

The kebab-case keyword for an element name: ListEntries -> :list-entries.
sourceraw docstring

element-valueclj

(element-value el arrays)

An element as data. xsi:nil is nil; KeyValueOf… items are a map with the keys as strings; a WCF array is a vector; any other element with children a map with kebab-case keys; a leaf its text, a string.

An array is recognised by an ArrayOf… name, items in the Serialization/Arrays namespace, or two or more children of one name. Name one that may hold a single item, or none, in arrays (#{:list-entries}), or it reads as a map.

An element as data. xsi:nil is nil; KeyValueOf… items are a map with the
keys as strings; a WCF array is a vector; any other element with children a
map with kebab-case keys; a leaf its text, a string.

An array is recognised by an ArrayOf… name, items in the Serialization/Arrays
namespace, or two or more children of one name. Name one that may hold a
single item, or none, in arrays (#{:list-entries}), or it reads as a map.
sourceraw docstring

envelopeclj

(envelope {:keys [element namespace data-namespace]} request)

The SOAP 1.1 envelope for a call. Parameters are in the operation's namespace; members of nested values in :data-namespace (WCF's http://schemas.datacontract.org/2004/07/<CLR namespace>); a vector of scalars is a WCF array (string, int, long, boolean items).

Element names are written as given: the contract is case-sensitive and its parameters are often camelCase (filterRequest) where members are PascalCase. A map is written in DataContract's default member order, ordinal by name; pass [name value] pairs where the contract declares another order.

The SOAP 1.1 envelope for a call. Parameters are in the operation's
namespace; members of nested values in :data-namespace (WCF's
http://schemas.datacontract.org/2004/07/<CLR namespace>); a vector of
scalars is a WCF array (string, int, long, boolean items).

Element names are written as given: the contract is case-sensitive and its
parameters are often camelCase (filterRequest) where members are PascalCase.
A map is written in DataContract's default member order, ordinal by name;
pass [name value] pairs where the contract declares another order.
sourceraw docstring

envelope-nsclj

source

operation-specclj

(operation-spec config op opts)

Settings for one call: the client's defaults, then (:operations config) for op, then the per-call opts. The SOAPAction is WCF's default, namespace + contract + "/" + operation, unless :action is given.

Settings for one call: the client's defaults, then (:operations config) for
op, then the per-call opts. The SOAPAction is WCF's default,
namespace + contract + "/" + operation, unless :action is given.
sourceraw docstring

outcomeclj

(outcome status {:keys [fault malformed] :as read})

An attempt's outcome from the HTTP status and the read envelope: a fault whatever the status, then a non-2xx status, then an unreadable body.

An attempt's outcome from the HTTP status and the read envelope: a fault
whatever the status, then a non-2xx status, then an unreadable body.
sourceraw docstring

pairs?clj

(pairs? v)

Whether v is an ordered request: a sequence of [name value] pairs.

Whether v is an ordered request: a sequence of [name value] pairs.
sourceraw docstring

read-envelopeclj

(read-envelope root {:keys [operation arrays]})

Read a parsed response envelope: {:body .. :result ..}, {:fault ..}, or {:malformed cause}. :body is the response element as data, :result its <Operation>Result.

Read a parsed response envelope: {:body .. :result ..}, {:fault ..}, or
{:malformed cause}. :body is the response element as data, :result its
<Operation>Result.
sourceraw docstring

retry-fault?clj

(retry-fault? retry-faults message)

Whether a fault's message matches one of retry-faults: a string it contains, or a regex. iBABS answers a throttled call with the bare fault "Unknown fault occured".

Whether a fault's message matches one of retry-faults: a string it
contains, or a regex. iBABS answers a throttled call with the bare fault
"Unknown fault occured".
sourceraw docstring

retryable?clj

(retryable? {:keys [kind status] :as failure} {:keys [idempotent?] :as spec})

Whether a failed attempt is worth repeating. A call that never connected, a 429 and a fault named in :retry-faults were not carried out. A timeout, an I/O error or a 5xx may have been, so they are retried only for an :idempotent? operation, the default.

Whether a failed attempt is worth repeating. A call that never connected, a
429 and a fault named in :retry-faults were not carried out. A timeout, an
I/O error or a 5xx may have been, so they are retried only for an
:idempotent? operation, the default.
sourceraw docstring

soap-errorclj

(soap-error {:keys [kind fault status cause]}
            {:keys [operation]}
            endpoint
            attempts)

The :error map of a failed call. A fault is :fault with the server's :code and :message; anything else :external-error naming the endpoint.

The :error map of a failed call. A fault is :fault with the server's
:code and :message; anything else :external-error naming the endpoint.
sourceraw docstring

unavailable?clj

(unavailable? {:keys [kind status fault]} {:keys [retry-faults]})

Whether a failure says the service could not answer: no connection, a timeout, an I/O error, a 429 or 5xx without a fault, or a fault named in :retry-faults. This is what counts against the circuit.

Whether a failure says the service could not answer: no connection, a
timeout, an I/O error, a 429 or 5xx without a fault, or a fault named in
:retry-faults. This is what counts against the circuit.
sourceraw docstring

valid-request?clj

(valid-request? request)

Whether request can be sent: nil, a map, or [name value] pairs.

Whether request can be sent: nil, a map, or [name value] pairs.
sourceraw docstring

with-credentialsclj

(with-credentials request {:keys [credential-elements username password]})

Request with the credentials prepended as the parameters named by :credential-elements, e.g. ["username" "password"].

Request with the credentials prepended as the parameters named by
:credential-elements, e.g. ["username" "password"].
sourceraw docstring

xsi-nsclj

source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close