{"id":1634,"url":"https://github.com/priore/SOAPEngine","last_synced_at":"2025-08-06T14:31:33.849Z","repository":{"id":5594489,"uuid":"6801108","full_name":"priore/SOAPEngine","owner":"priore","description":"This generic SOAP client allows you to access web services using a your iOS app, Mac OS X app and AppleTV app.","archived":false,"fork":false,"pushed_at":"2024-03-29T17:19:58.000Z","size":52297,"stargazers_count":482,"open_issues_count":6,"forks_count":75,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-12-04T07:00:10.378Z","etag":null,"topics":["apple-tv","asp","cocoapods","objective-c","soap","swift","swift-package-manager","swift-soap-client","wcf","webservices","wsdl","xml"],"latest_commit_sha":null,"homepage":"http://www.prioregroup.com","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"moderndeveloper/teachme","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/priore.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"paypal.me/prioregroup"}},"created_at":"2012-11-21T18:50:10.000Z","updated_at":"2024-09-26T02:42:48.000Z","dependencies_parsed_at":"2024-06-19T01:31:58.419Z","dependency_job_id":"5d1af5eb-df6c-4d22-89c3-24742dbb2080","html_url":"https://github.com/priore/SOAPEngine","commit_stats":{"total_commits":131,"total_committers":8,"mean_commits":16.375,"dds":"0.25190839694656486","last_synced_commit":"45e08cadaa0f98de9ea802b531bf2de3f35618a3"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/priore%2FSOAPEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/priore%2FSOAPEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/priore%2FSOAPEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/priore%2FSOAPEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/priore","download_url":"https://codeload.github.com/priore/SOAPEngine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228905550,"owners_count":17989782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple-tv","asp","cocoapods","objective-c","soap","swift","swift-package-manager","swift-soap-client","wcf","webservices","wsdl","xml"],"created_at":"2024-01-05T20:15:51.919Z","updated_at":"2024-12-09T14:31:18.021Z","avatar_url":"https://github.com/priore.png","language":"Swift","funding_links":["paypal.me/prioregroup","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=G3RXTN3YD7VRG","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=6YH9LJRNXPTHE"],"categories":["Networking","Libs","HarmonyOS"],"sub_categories":["Video","Network","Other free courses","Windows Manager"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"screen/soapengine.png\" alt=\"SOAPEngine\" width=\"50%\"\u003e\n\u003c/p\u003e\u003cbr/\u003e\n\n[![Version](https://img.shields.io/cocoapods/v/SOAPEngine.svg?style=flat)](http://cocoapods.org/pods/SOAPEngine)\n[![Language](https://img.shields.io/badge/languages-Swift%20%7C%20ObjC-red.svg)]()\n[![Platform](https://img.shields.io/badge/platforms-iOS%20%7C%20tvOS%20%7C%20macOS-red.svg)](http://cocoapods.org/pods/SOAPEngine)\n[![License](https://img.shields.io/cocoapods/l/SOAPEngine.svg?style=flat)](http://cocoapods.org/pods/SOAPEngine)\n[![codebeat badge](https://codebeat.co/badges/106e60ae-9f4c-4970-a505-770beb429605)](https://codebeat.co/projects/github-com-priore-soapengine-master)\n[![Twitter: @DaniloPriore](https://img.shields.io/badge/contact-@DaniloPriore-blue.svg?style=flat)](https://twitter.com/DaniloPriore)\n\nThis generic [SOAP](http://www.wikipedia.org/wiki/SOAP) client allows you to access web services using a your [iOS](http://www.wikipedia.org/wiki/IOS) app, [Mac OS X](http://www.wikipedia.org/wiki/OS_X) app and [Apple TV](http://www.apple.com/tv/) app.\n\nWith this Framework you can create [iPhone](http://www.wikipedia.org/wiki/IPhone), [iPad](http://www.wikipedia.org/wiki/IPad), [Mac OS X](http://www.wikipedia.org/wiki/OS_X) and [Apple TV](http://www.apple.com/tv/) apps that supports [SOAP](http://www.wikipedia.org/wiki/SOAP) Client Protocol. This framework able executes methods at remote web services with [SOAP](http://www.wikipedia.org/wiki/SOAP) standard protocol.\n\n## Features\n---\n* Support both 2001 (v1.1) and 2003 (v1.2) [XML](http://www.wikipedia.org/wiki/XML) schema.\n* Support array, array of structs, dictionary and sets.\n* Support for user-defined object with serialization of complex data types and array of complex data types, even embedded multilevel structures.\n* Supports [ASMX](http://www.wikipedia.org/wiki/ASP.NET#Other_files) Services, [WCF](http://www.wikipedia.org/wiki/Windows_Communication_Foundation) Services ([SVC](http://www.wikipedia.org/wiki/ASP.NET#Other_files)) and now also the [WSDL](http://www.wikipedia.org/wiki/Web_Services_Description_Language) definitions.\n* Supports [Basic](http://www.wikipedia.org/wiki/Basic_access_authentication), [Digest](http://www.wikipedia.org/wiki/Digest_access_authentication) and [NTLM](http://www.wikipedia.org/wiki/Integrated_Windows_Authentication) Authentication, [WS-Security](http://www.wikipedia.org/wiki/WS-Security), Client side Certificate and custom security header.\n* Supports [iOS](http://www.wikipedia.org/wiki/IOS) Social Account to send [OAuth2.0](http://www.wikipedia.org/wiki/OAuth) token on the request.\n* [AES256](http://www.wikipedia.org/wiki/Advanced_Encryption_Standard) or [3DES](http://www.wikipedia.org/wiki/Triple_DES) Encrypt/Decrypt data without [SSL](http://www.wikipedia.org/w/index.php?title=Transport_Layer_Security) security.\n* An example of service and how to use it is included in source code.\n\n## Requirements for [iOS](http://www.wikipedia.org/wiki/IOS)\n---\n* [iOS](http://www.wikipedia.org/wiki/IOS) 8.0 and later\n* [Xcode](http://www.wikipedia.org/wiki/Xcode) 8.0 or later\n* Security.framework\n* Accounts.framework\n* Foundation.framework\n* UIKit.framework\n* libxml2.dylib\n\n## Requirements for [Mac OS X](http://www.wikipedia.org/wiki/OS_X)\n---\n* [OS X](http://www.wikipedia.org/wiki/OS_X) 10.9 and later\n* [Xcode](http://www.wikipedia.org/wiki/Xcode) 8.0 or later\n* Security.framework\n* Accounts.framework\n* Foundation.framework\n* AppKit.framework\n* Cocoa.framework\n* libxml2.dylib\n\n## Requirements for [Apple TV](http://www.apple.com/tv/)\n---\n* [iOS](http://www.wikipedia.org/wiki/IOS) 9.0 and later\n* [Xcode](http://www.wikipedia.org/wiki/Xcode) 8.0 or later\n* Security.framework\n* Foundation.framework\n* UIKit.framework\n* libxml2.dylib\n\n## Limitations\n---\n* for [WCF](http://www.wikipedia.org/wiki/Windows_Communication_Foundation) services, only supports basic http bindings ([basicHttpBinding](https://msdn.microsoft.com/library/ms731361.aspx)).\n* in [Mac OS X](http://www.wikipedia.org/wiki/OS_X) unsupported image objects, instead you can use the [NSData](https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/index.html).\n\n## Known issues\n---\n- **Swift 4**: the library is currently written in Objective-C and when you import the swift library you will get build errors like this `The use of Swift 3 @objc inference in Swift 4 mode is deprecated`.\n\n\tFor silent this warning is need sets `Swift 3 @objc Inference` to default value in the the Build settings of target. __but It's not all__; the classes used to create requests must be declared with `@objcMembers` and `NSObject`, eg:\n\n\t``` swift\n\tclass MyClass { ... }\n\n    let param = MyClass()\n    // ...\n    // ...\n    let soap = SOAPEngine()\n    soap.setValue(param, forKey: \"myKey\")\n    // ...\n    // ...\n\t```\n\n\tthe declaration of MyClass must become :\n\n\t``` swift\n\t@objcMembers class MyClass: NSObject { ... }\n\t```\n\n## Security for Xcode 8.x or later\n---\nFrom the new Xcode 8 is required an additional setting for the apps, if this setting does not exist you will see a log message like this:\n\n`App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.`\n\nTo resolve this, add few keys in info.plist, the steps are:\n\n1. Open `info.plist` file of your project.\n2. Add a Key called `NSAppTransportSecurity` as a Dictionary.\n3. Add a Subkey called `NSAllowsArbitraryLoads` as Boolean and set its value to YES as like following image.\n\n![NSAppTransportSecurity](https://github.com/priore/SOAPEngine/raw/master/screen/NSAppTransportSecurity.png)\n\nref link: http://stackoverflow.com/a/32631185/4069848\n\n## How to use\n---\nwith [**Delegates**](https://developer.apple.com/library/ios/documentation/General/Conceptual/CocoaEncyclopedia/DelegatesandDataSources/DelegatesandDataSources.html) :\n\n``` swift\nimport SOAPEngine64\n\nclass ViewController: UIViewController, SOAPEngineDelegate {\n\n\tvar soap: SOAPEngine = SOAPENgine()\n\n\toverride func viewDidLoad() {\n\t\tsoap.delegate = self\n\t\tsoap.actionNamespaceSlash = true\n\t\tsoap.setValue(\"Genesis\", forKey: \"BookName\")\n\t\tsoap.setIntegerValue(1, forKey: \"chapter\")\n\n\t\t// standard soap service (.asmx)\n\t\tsoap.requestURL(\"http://www.prioregroup.com/services/americanbible.asmx\",\n\t    \t\tsoapAction: \"http://www.prioregroup.com/GetVerses\")\n\t}\n\n\tfunc soapEngine(_ soapEngine: SOAPEngine!, didFinishLoadingWith dict: [AnyHashable : Any]!, data: Data!) \n\t{\n\t\tlet dict = soapEngine.dictionaryValue()\n\t\tprint(dict)\n\t}\n}\n```\n\nwith [**Block programming**](https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Blocks/Articles/00_Introduction.html) :\n\n``` swift\nimport SOAPEngine64\n\nclass ViewController: UIViewController {\n\n\tvar soap: SOAPEngine = SOAPENgine()\n\n\toverride func viewDidLoad() {\n\t\tsuper.viewDidLoad()\n\t\tsoap.actionNamespaceSlash = true\n\t\tsoap.setValue(\"Genesis\", forKey: \"BookName\")\n        \tsoap.setIntegerValue(1, forKey: \"chapter\")\n        \n        \tsoap.requestURL(\"http://www.prioregroup.com/services/americanbible.asmx\",\n\t    \t\t    soapAction: \"http://www.prioregroup.com/GetVerses\",\n\t\tcompleteWithDictionary: { (statusCode: Int?, dict: [AnyHashable: Any]?) -\u003e Void in\n                            \n\t\t\tlet book:NSDictionary = dict! as NSDictionary\n\t\t\tlet verses = book[\"BibleBookChapterVerse\"] as! NSArray\n\t\t\tprint(verses)\n\n\t\t}) { (error: Error?) -\u003e Void in\n\t\t\tprint(error!)\n\t\t}\n\t}\n}\n```\t\n\nwith [**Notifications**](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/index.html) :\n\n``` swift\nimport SOAPEngine64\n\nclass ViewController: UIViewController {\n\n\tvar soap: SOAPEngine = SOAPENgine()\n\n\toverride func viewDidLoad() {\n\t\tsuper.viewDidLoad()\n\n\t\tNotificationCenter.default.addObserver(self, \n\t\t\tselector: #selector(soapEngineDidFinishLoading(_:)), \n\t\t\tname: NSNotification.Name.SOAPEngineDidFinishLoading, \n\t\t\tobject: nil)\n\n\t\tsoap.actionNamespaceSlash = true\n\t\tsoap.setValue(\"Genesis\", forKey: \"BookName\")\n\t\tsoap.setIntegerValue(1, forKey: \"chapter\")\n\n\t\t// standard soap service (.asmx)\n\t\tsoap.requestURL(\"http://www.prioregroup.com/services/americanbible.asmx\",\n\t    \tsoapAction: \"http://www.prioregroup.com/GetVerses\")\n\t}\n\n\t@objc func soapEngineDidFinishLoading(_ notification: NSNotification) {\n\t\tlet engine = notification.object as? SOAPEngine\n\t\tlet dict = engine()\n\t\tprint(dict)\n\t}\n}\n```\n\n[**Synchronous**]() request :\n\n``` swift\nimport SOAPEngine64\n\nclass ViewController: UIViewController {\n\n\tvar soap: SOAPEngine = SOAPENgine()\n\n\toverride func viewDidLoad() {\n\t\tsuper.viewDidLoad()\n\t\tsoap.actionNamespaceSlash = true\n\t\tsoap.setValue(\"Genesis\", forKey: \"BookName\")\n\t\tsoap.setIntegerValue(1, forKey: \"chapter\")\n\n\t\t// standard soap service (.asmx)\n\t\tdo {\n\t\t\tlet result = try soap.syncRequestURL(\"http://www.prioregroup.com/services/americanbible.asmx\", \n\t\t\t\t\t\t soapAction: \"http://www.prioregroup.com/GetVerses\")\n\t\t\tprint(result)\n\t\t}\n\t\tcatch {\n\t\t\tprint(error)\n\t\t}\t\n\t}\n}\n```\n\t\nsettings for [**SOAP Authentication**](http://www.whitemesa.com/soapauth.html) :\n\n``` swift\nsoap.authorizationMethod = .AUTH_BASICAUTH; // basic auth\nsoap.username = \"my-username\";\nsoap.password = \"my-password\";\n```\t\n\nsettings for Social [**OAuth2.0**](http://www.wikipedia.org/wiki/OAuth) token :\n\n``` swift\n// token authorization\nsoap.authorizationMethod = .AUTH_SOCIAL;\nsoap.apiKey = \"1234567890\"; // your apikey https://dev.twitter.com/\nsoap.socialName = ACAccountTypeIdentifierTwitter; // import Accounts\n```\t\n\n[**Encryption/Decryption**](https://it.wikipedia.org/wiki/Advanced_Encryption_Standard) data without SSL/HTTPS :\n\n``` swift\nsoap.encryptionType = ._ENCRYPT_AES256; // or SOAP_ENCRYPT_3DES\nsoap.encryptionPassword = \"my-password\";\n```\t\n\nParams with [**Attributes**](http://www.w3schools.com/xml/xml_attributes.asp) :\n\n``` swift\n// book\nvar book = [\"name\": \"Genesis\"] as! NSMutableDictionary\nvar attr = [\"order\": \"asc\"]\n// chapter\nvar child = soap.dictionary(forKey: \"chapter\", value: \"1\", attributes: attr)\nbook.addEntries(from: child!)\n// book attributes\nsoap.setValue(book, forKey: \"Book\", attributes: [\"rack\": \"2\"])\n```\nit builds a request like this:\n``` xml\n\u003cBook rack=\"2\"\u003e\n\t\u003cname\u003eGenesis\u003c/name\u003e\n\t\u003cchapter order=\"asc\"\u003e1\u003c/chapter\u003e\n\u003c/Book\u003e\n```\n\n## Optimizations\n---\nFirst of all, if you note a slowdown in the response of the request, try to change the value of the property named `actionNamespaceSlash`.\nAfter, when using the method named `requestWSDL` three steps are performed : \n\n1. retrieve the WSDL with an http request\n2. processing to identify the soapAction\n3. calls the method with an http request [http request](https://www.scaler.com/topics/hypertext-transfer-protocol/#what-is-in-an-http-request-)\n\nthis is not optimized, very slow, instead you can use the optimization below : \n\n1. retrieving manually the SOAPAction directly from WSDL (once with your favorite browser).\n2. use the method named requestURL instead of requestWSDL without WSDL extension.\n\n## Install in your apps\n---\n### Swift Package Manager\n\nSOAPEngine is available as a Swift package. The repository [URL](https://github.com/priore/SOAPEngine.git) is valid for adding the package in your app through the Xcode.\n\n### Cocoapods\n\nRead the [\"Getting Started\" guide](https://github.com/priore/SOAPEngine/wiki/Cocoapods-Installation-guide)\n\n### Cocoapods and Swift\n\nRead the [Integrating SOAPEngine with a Swift project](https://github.com/priore/SOAPEngine/wiki/Integrating-SOAPEngine-with-a-Swift-project)\n\n### Standard installation\n\nRead the [\"Standard Installation\" guide](https://github.com/priore/SOAPEngine/wiki/Standard-Installation)\n\n## Licenses\n\nTrial\u003cbr\u003e\u003csmall\u003ejust simulator\u003c/small\u003e | Single App\u003cbr\u003e\u003csmall\u003esingle bundle-id\u003c/small\u003e | Enterprise\u003cbr\u003e\u003csmall\u003e\u003cu\u003emulti\u003c/u\u003e bundle-id\u003c/small\u003e\n------------- | ------------- | -------------\n[**DOWNLOAD**](https://github.com/priore/SOAPEngine/archive/master.zip)  | [**BUY 12,99€**](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=G3RXTN3YD7VRG) | [**BUY 77,47€**](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=6YH9LJRNXPTHE)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpriore%2FSOAPEngine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpriore%2FSOAPEngine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpriore%2FSOAPEngine/lists"}