soap-0.2.2.4: SOAP client tools

Safe HaskellNone

Network.SOAP.Transport.HTTP

Contents

Synopsis

Initialization

initTransport :: EndpointURL -> RequestP -> BodyP -> IO TransportSource

Create a http-client transport. Use identity transformers if you don't need any special treatment.

initTransport_ :: EndpointURL -> IO TransportSource

Create a transport without any request and body processing.

initTransportWith :: ManagerSettings -> EndpointURL -> RequestP -> BodyP -> IO TransportSource

Create a http-client transport using manager settings (for plugging tls etc.).

confTransport :: Text -> Config -> IO TransportSource

Load common transport parameters from a configurator file.

 soap {
   url = "https://vendor.tld/service/"
   trace = true
   timeout = 15
 }

Only url field is required.

 import Data.Configurator (load, Worth(Required))
 main = do
     transport <- confTransport "soap" =<< load [Required "etc/example.conf"]

confTransportWith :: ManagerSettings -> Text -> Config -> RequestP -> BodyP -> IO TransportSource

A more extensible transport parameter loader.

type EndpointURL = StringSource

Web service URL. Configured at initialization, but you can tweak it dynamically with a request processor.

Making a request

type RequestP = Request -> RequestSource

Update request record after defaults and method-specific fields are set.

traceRequest :: RequestPSource

Show a debug dump of a request body.

Processing a response

type BodyP = ByteString -> ByteStringSource

Process response body to make it a nice UTF8-encoded XML document.

iconv :: EncodingName -> BodyPSource

Create an IConv-based processor.

traceBody :: BodyPSource

Show a debug dump of a response body.

Raw transport function

runQuery :: Manager -> EndpointURL -> RequestP -> BodyP -> TransportSource

Render document, submit it as a POST request and retrieve a body.