Safe Haskell | None |
---|
A heart of the package, invokeWS
assembles and executes requests.
- invokeWS :: (ToXML h, ToXML b) => Transport -> String -> h -> b -> ResponseParser a -> IO a
- type Transport = String -> Document -> IO ByteString
- data ResponseParser a
- = StreamParser (Parser a)
- | CursorParser (Cursor -> a)
- | DocumentParser (Document -> a)
- | RawParser (ByteString -> a)
- type Parser a = Sink Event (ResourceT IO) a
Documentation
:: (ToXML h, ToXML b) | |
=> Transport | Configured transport to make requests with. |
-> String | SOAPAction header. |
-> h | SOAP Header element. () or Nothing will result in omiting the Header node. Put a comment if you need an empty element present. |
-> b | SOAP Body element. |
-> ResponseParser a | Parser to use on a request reply. |
-> IO a |
Prepare data, assemble request and apply a parser to a response.
= String | SOAPAction header |
-> Document | XML document with a SOAP request |
-> IO ByteString |
Common transport type. Get a request and deliver it to an endpoint specified during initialization.
data ResponseParser a Source
Different parsing modes available to extract reply contents.
StreamParser (Parser a) | Streaming parser from Text.XML.Stream.Parse |
CursorParser (Cursor -> a) | XPath-like parser from Text.XML.Cursor |
DocumentParser (Document -> a) | Parse raw XML document. |
RawParser (ByteString -> a) | Work with a raw bytestring. |