soap-0.2.3.6: SOAP client tools

Safe Haskell | None
Language | Haskell98

Network.SOAP.Transport.Mock

Description

Debug transport to train your parsers without bugging real services.

Synopsis

- initTransport :: Handlers -> IO Transport
- type Handler = Document -> IO ByteString
- type Handlers = [(String, Handler)]
- handler :: ToXML a => (Document -> IO a) -> Handler
- fault :: Text -> Text -> Text -> Handler
- runQuery :: [(String, Handler)] -> Transport

# Documentation

initTransport :: Handlers -> IO Transport Source #

Wrap a collection of handlers into a transport.

type Handler = Document -> IO ByteString Source #

type Handlers = [(String, Handler)] Source #

handler :: ToXML a => (Document -> IO a) -> Handler Source #

Process a Document and wrap result in a SOAP Envelope.

fault Source #

Arguments

:: Text | SOAP Fault code (e.g. «soap:Server»)
-> Text | Fault string
-> Text | Fault detail
-> Handler |

Emulate a SOAP fault.

runQuery :: [(String, Handler)] -> Transport Source #

Choose and apply a handler.