name: soap version: 0.2.0.2 synopsis: SOAP client tools description: 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 . * 0.2: Switch to xml-conduit-writer for more clean serializers. Pluggable transports. Raw and streaming parsers. . * 0.1: Initial implementation, somewhat inflexible and warty, but working with diverse services. homepage: https://bitbucket.org/dpwiz/haskell-soap license: MIT license-file: LICENSE author: Alexander Bondarenko maintainer: aenor.realm@gmail.com -- copyright: category: Web build-type: Simple cabal-version: >=1.8 library hs-source-dirs: src/ ghc-options: -Wall -O2 exposed-modules: Network.SOAP Network.SOAP.Transport Network.SOAP.Exception Network.SOAP.Transport.HTTP.Conduit Network.SOAP.Transport.Mock Network.SOAP.Parsing.Cursor Network.SOAP.Parsing.Stream build-depends: base ==4.*, http-conduit, resourcet, tls-extra, http-types, xml-conduit-writer, xml-conduit, xml-types, conduit, data-default, text, bytestring, iconv, unordered-containers, mtl test-suite tests type: exitcode-stdio-1.0 main-is: Main.hs hs-source-dirs: test/ build-depends: base, soap, hspec, HUnit, xml-conduit, xml-conduit-writer, text, bytestring, unordered-containers