Skip to content

Instantly share code, notes, and snippets.

@priore
Created October 25, 2013 23:34
Show Gist options
  • Save priore/7163424 to your computer and use it in GitHub Desktop.
Save priore/7163424 to your computer and use it in GitHub Desktop.
iOS SOAP client engine
/*
This generic SOAP client allows you to access web services using a your iOS app.
https://github.com/priore/SOAPEngine
With this Framework you can create iPhone and iPad Apps that supports SOAP Client Protocol. This framework able executes methods at remote web services with SOAP standard protocol.
** Features
* Support both 2001 (v1.1) and 2003 (v1.2) XML schema.
* Support array, array of structs and dictionary.
* Support user-defined object. Capable of serializing complex data types and array of complex data types, even multi-level embedded structs.
* An example is included in source code.
** Requirements
* iOS 4.x, 5.x and last iOS6.
* XCode 4.1 or later
* Security.framework
* Foundation.framework
* UIKit.framework
* libxml2.dylib
Below a simple example on Objective-C :
https://github.com/priore/SOAPEngine
*/
#import <SOAPEngine/SOAPEngine.h>
SOAPEngine *soap = [[SOAPEngine alloc] init];
soap.userAgent = @"SOAPEngine";
soap.delegate = self; // use SOAPEngineDelegate
[soap setValue:@"my-value1" forKey:@"Param1"];
[soap setIntegerValue:1234 forKey:@"Param2"];
[soap requestURL:@"http://www.my-web.com/my-service.asmx" soapAction:@"http://www.my-web.com/My-Method-name"];
#pragma mark - SOAPEngine delegates
- (void)soapEngine:(SOAPEngine *)soapEngine didFinishLoading:(NSString *)stringXML {
NSDictionary *result = [soapEngine dictionaryValue];
// read data from a dataset table
NSArray *list = [result valueForKeyPath:@"NewDataSet.Table"];
}
// https://github.com/priore/SOAPEngine
@Pacaman13
Copy link

I'm trying to call a method with "call" SoapAction, so I need to pass an Array forKey "args". Unfortunately soap.setValue( myArray, forKey: "args") does not work
PS: I use Swift language

could someone please help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment