The soap package

[Tags:library, mit]

Tools to build SOAP clients using xml-conduit.

A mildly-complicated example:

 main = do
     -- Initial one-time preparations.
     certP <- clientCert "priv/client.crt" "priv/client.key"
     transport <- initTransport "https://example.com/soap/endpoint" certP (iconv "cp-1251")

     -- Making queries
     activeStaff <- listStaff transport True
     print activeStaff

 data Person = Person Text Int deriving Show

 listStaff :: Transport -> Bool -> IO [Person]
 listStaff t active = invokeWS t "urn:dummy:listStaff" () body parser
     where
         body = element "request" $ element "listStaff" $ do
                    element "active" active
                    element "order" $ T.pack "age"
                    element "limit" (10 :: Int)

         parser = StreamParser $ force "no people" $ tagNoAttr "people" $ Parse.many parsePerson

         parsePerson = tagName "person" (requireAttr "age") $ \age -> do
                           name <- Parse.content
                           return $ Person name (read . unpack $ age)

Changelog

Properties

Versions 0.1.0.0, 0.1.0.1, 0.1.0.3, 0.1.0.4, 0.2.0.0, 0.2.0.2, 0.2.0.3, 0.2.0.4, 0.2.1.1, 0.2.1.2, 0.2.1.3, 0.2.2.0, 0.2.2.1, 0.2.2.2, 0.2.2.3, 0.2.2.4, 0.2.2.5, 0.2.2.6, 0.2.2.7, 0.2.3.0 (info)
Dependencies base (==4.*), bytestring, conduit, data-default, http-conduit, http-types, iconv, mtl, resourcet, text, tls-extra, unordered-containers, xml-conduit, xml-conduit-writer, xml-types [details]
License MIT
Author Alexander Bondarenko
Maintainer aenor.realm@gmail.com
Stability Unknown
Category Web
Home page https://bitbucket.org/dpwiz/haskell-soap
Uploaded Thu Apr 18 12:09:43 UTC 2013 by AlexanderBondarenko
Distributions LTSHaskell:0.2.3.0, NixOS:0.2.3.0, Stackage:0.2.3.0
Downloads 3237 total (50 in the last 30 days)
Votes
0 []
Status Docs not available [build log]
All reported builds failed as of 2015-11-25 [all 5 reports]

Modules

  • Network
    • Network.SOAP
      • Network.SOAP.Exception
      • Parsing
        • Network.SOAP.Parsing.Cursor
        • Network.SOAP.Parsing.Stream
      • Network.SOAP.Transport
        • HTTP
          • Network.SOAP.Transport.HTTP.Conduit
        • Network.SOAP.Transport.Mock

Downloads

Maintainer's Corner

For package maintainers and hackage trustees