packages feed

shoap (empty) → 0.1

raw patch · 4 files changed

+59/−0 lines, 4 filesdep +basedep +curlsetup-changed

Dependencies added: base, curl

Files

+ LICENSE view
@@ -0,0 +1,27 @@+Copyright (c) 2010 Richard Fergie++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions+are met:+1. Redistributions of source code must retain the above copyright+   notice, this list of conditions and the following disclaimer.+2. Redistributions in binary form must reproduce the above copyright+   notice, this list of conditions and the following disclaimer in the+   documentation and/or other materials provided with the distribution.+3. Neither the name of the author nor the names of his contributors+   may be used to endorse or promote products derived from this software+   without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF+SUCH DAMAGE.
+ Network/Soap.hs view
@@ -0,0 +1,13 @@+module Network.Soap where+import Network.Curl ++soapMessage header body = "<?xml version=\"1.0\"?><env:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><env:Header>"++header++"</env:Header><env:Body>"++body++"</env:Body></env:Envelope>"++soapPost url message = initialize >>= \ h -> do+  setopt h (CurlVerbose False)+  setopt h (CurlHttpHeaders ["SOAPAction: shoap"])+  setopt h (CurlPostFields message)+  setopt h (CurlCookieJar "cookies")+  setopt h (CurlURL url)+  perform h+  return ()
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ shoap.cabal view
@@ -0,0 +1,17 @@+Name:		shoap+Version:	0.1+Cabal-Version:  >= 1.2+Build-Type:     Simple+License:	BSD3+License-File:	LICENSE+Author:		Richard Fergie+Maintainer:	richard.fergie@gmail.com+Homepage:	http://richardfergie.com/shoap+Category:	Network+Synopsis:	A very basic SOAP package+Description:	Wraps a message in SOAP headers and provides a function to POST this message to a URL.++Library+  Build-Depends:	base >= 2 && < 4, curl+  Exposed-modules:	Network.Soap+