Skip to content

Commit

Permalink
fixes the custom objects serialization #183
Browse files Browse the repository at this point in the history
  • Loading branch information
priore committed May 23, 2018
1 parent e183bee commit 54c3f83
Show file tree
Hide file tree
Showing 13 changed files with 190 additions and 64 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.txt
@@ -1,3 +1,6 @@
1.42, May 23, 2018
- fixes the custom objects serialization

1.41, Apr 5, 2018
- implementation for Digest Authentication type on header of requests

Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion SOAPEngine.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'SOAPEngine'
s.version = '1.41'
s.version = '1.42'
s.summary = 'This generic SOAP client allows you to access web services using a your iOS and Mac OS X app.'
s.license = { :type => 'Shareware', :file => 'LICENSE.txt' }
s.authors = { 'Danilo Priore' => 'support@prioregroup.com' }
Expand Down
79 changes: 60 additions & 19 deletions SOAPEngine64.framework/Headers/SOAPEngine.h
Expand Up @@ -10,11 +10,11 @@
//
// email support: support@prioregroup.com
//
// Version : 1.41
// Version : 1.42
// Changelog : https://github.com/priore/SOAPEngine/blob/master/CHANGELOG.txt
// Updates : https://github.com/priore/SOAPEngine
//
#define SOAPEngineFrameworkVersion @"1.41" DEPRECATED_MSG_ATTRIBUTE("SOAPEngineFrameworkVersion as deprecated please use SOAPEngine64VersionString")
#define SOAPEngineFrameworkVersion @"1.42" DEPRECATED_MSG_ATTRIBUTE("SOAPEngineFrameworkVersion as deprecated please use SOAPEngine64VersionString")

#import <Foundation/Foundation.h>

Expand All @@ -31,6 +31,8 @@
FOUNDATION_EXPORT const unsigned char SOAPEngineOSXVersionString[];
#endif

#pragma mark - Notification Constants

// Local Notification names
FOUNDATION_EXPORT NSString *const SOAPEngineDidFinishLoadingNotification;
FOUNDATION_EXPORT NSString *const SOAPEngineDidFailWithErrorNotification;
Expand All @@ -40,6 +42,8 @@ FOUNDATION_EXPORT NSString *const SOAPEngineDidBeforeParsingResponseStringNotifi
FOUNDATION_EXPORT NSString *const SOAPEngineDidReceiveDataSizeNotification;
FOUNDATION_EXPORT NSString *const SOAPEngineDidSendDataSizeNotification;

#pragma mark - Notifications Keys Constants

// UserInfo dictionary keys for Local Noficiations
FOUNDATION_EXPORT NSString *const SOAPEngineStatusCodeKey; // response status code
FOUNDATION_EXPORT NSString *const SOAPEngineXMLResponseKey; // response xml
Expand All @@ -51,6 +55,8 @@ FOUNDATION_EXPORT NSString *const SOAPEngineErrorKey; // errors
FOUNDATION_EXPORT NSString *const SOAPEngineDataSizeKey; // send/receive data size
FOUNDATION_EXPORT NSString *const SOAPEngineTotalDataSizeKey; // send/receive total data size

#pragma mark - Blocks Defines

typedef void(^SOAPEngineCompleteBlockWithDictionary)(NSInteger statusCode, NSDictionary *dict);
typedef void(^SOAPEngineCompleteBlock)(NSInteger statusCode, NSString *stringXML)
DEPRECATED_MSG_ATTRIBUTE("SOAPEngineCompleteBlock as deprecated please use SOAPEngineCompleteBlockWithDictionary");
Expand All @@ -61,6 +67,8 @@ typedef void(^SOAPEngineSendDataSizeBlock)(NSUInteger current, NSUInteger total)
typedef void(^SOAPEngineReceivedProgressBlock)(NSProgress *progress);
typedef void(^SOAPEngineSendedProgressBlock)(NSProgress *progress);

#pragma mark - Enums

typedef NS_ENUM(NSInteger, SOAPVersion)
{
VERSION_1_1,
Expand Down Expand Up @@ -99,6 +107,8 @@ typedef NS_ENUM(NSInteger, SOAPCertificate)

@interface SOAPEngine : NSObject

#pragma mark - Properties

// return the current request URL
@property (nonatomic, strong, readonly) NSURL *currentRequestURL;
@property (nonatomic, strong, readonly, getter=currentRequestURL) NSURL *requestURL
Expand Down Expand Up @@ -222,9 +232,13 @@ typedef NS_ENUM(NSInteger, SOAPCertificate)
// sets the receiver of the delegates
@property (nonatomic, weak) id<SOAPEngineDelegate> delegate;

#pragma mark - Static Methods

+ (SOAPEngine *)sharedInstance;
+ (SOAPEngine *)manager;

#pragma mark - Methods

// returns the value for a webservice that returns a single value
- (NSInteger)integerValue;
- (float)floatValue;
Expand Down Expand Up @@ -268,6 +282,26 @@ typedef NS_ENUM(NSInteger, SOAPCertificate)
// clear all parameters, usually used before a new request with the same instance.
- (void)clearValues;

// sets logins
- (void)login:(NSString*)username
password:(NSString*)password;

- (void)login:(NSString*)username
password:(NSString*)password
realm:(NSString*)realm;

- (void)login:(NSString*)username
password:(NSString*)password
authorization:(SOAPAuthorization)authorization;

// for PAYPAL login
- (void)login:(NSString*)username
password:(NSString*)password
email:(NSString*)email
signature:(NSString*)signature;

#pragma mark - Request with delegates

// webservice request (async)
- (void)requestURL:(id)asmxURL soapAction:(NSString*)soapAction;
- (void)requestURL:(id)asmxURL soapAction:(NSString*)soapAction value:(id)value;
Expand All @@ -278,6 +312,8 @@ typedef NS_ENUM(NSInteger, SOAPCertificate)
- (NSDictionary*)syncRequestURL:(id)asmxURL soapAction:(NSString*)soapAction value:(id)value error:(NSError**)error;
- (NSDictionary*)syncRequestURL:(id)asmxURL soapAction:(NSString*)soapAction value:(id)value forKey:(NSString*)key error:(NSError**)error;

#pragma mark - Request with blocks

// webservice request with block
- (void)requestURL:(id)asmxURL
soapAction:(NSString *)soapAction
Expand Down Expand Up @@ -372,47 +408,52 @@ completeWithDictionary:(SOAPEngineCompleteBlockWithDictionary)complete
receivedProgress:(SOAPEngineReceivedProgressBlock)receive
sendedProgress:(SOAPEngineSendedProgressBlock)sended;

#pragma mark - Request with block (Reflection)

// request with object reflection
//- (void)requestURL:(id)asmxURL
// soapAction:(NSString *)soapAction
// class:(Class)classType
//completeWithObject:(void(^)(NSInteger statusCode, id object))complete
// failWithError:(SOAPEngineFailBlock)fail;

#pragma mark - Request with WSDL

// request with WSDL
// note: better use requestURL, read this https://github.com/priore/SOAPEngine#optimizations
- (void)requestWSDL:(id)wsdlURL operation:(NSString*)operation;
- (void)requestWSDL:(id)wsdlURL operation:(NSString*)operation
DEPRECATED_MSG_ATTRIBUTE("requestWSDL:operation: as deprecated please use requestURL:soapAction:");

- (void)requestWSDL:(id)wsdlURL
operation:(NSString *)operation
completeWithDictionary:(SOAPEngineCompleteBlockWithDictionary)complete
failWithError:(SOAPEngineFailBlock)fail;
failWithError:(SOAPEngineFailBlock)fail
DEPRECATED_MSG_ATTRIBUTE("requestWSDL:operation:completeWithDictionary:failWithError: as deprecated please use requestURL:soapAction:completeWithDictionary:failWithError:");

- (void)requestWSDL:(id)wsdlURL
operation:(NSString *)operation
value:(id)value
completeWithDictionary:(SOAPEngineCompleteBlockWithDictionary)complete
failWithError:(SOAPEngineFailBlock)fail;
failWithError:(SOAPEngineFailBlock)fail
DEPRECATED_MSG_ATTRIBUTE("requestWSDL:operation:value:completeWithDictionary:failWithError: as deprecated please use requestURL:soapAction:value:completeWithDictionary:failWithError:");

- (void)requestWSDL:(id)wsdlURL
operation:(NSString *)operation
value:(id)value
forKey:(NSString*)key
completeWithDictionary:(SOAPEngineCompleteBlockWithDictionary)complete
failWithError:(SOAPEngineFailBlock)fail;
failWithError:(SOAPEngineFailBlock)fail
DEPRECATED_MSG_ATTRIBUTE("requestWSDL:operation:value:forKey:completeWithDictionary:failWithError: as deprecated please use requestURL:soapAction:value:forKey:completeWithDictionary:failWithError:");

// sets logins
- (void)login:(NSString*)username
password:(NSString*)password;

- (void)login:(NSString*)username
password:(NSString*)password
authorization:(SOAPAuthorization)authorization;

// for PAYPAL login
- (void)login:(NSString*)username
password:(NSString*)password
email:(NSString*)email
signature:(NSString*)signature;
#pragma mark - Cancel all requests

// cancel all delegates, blocks or notifications
- (void)cancel;

@end

#pragma mark - Protocol

@protocol SOAPEngineDelegate <NSObject>

@optional
Expand Down
Binary file modified SOAPEngine64.framework/Info.plist
Binary file not shown.
Binary file modified SOAPEngine64.framework/SOAPEngine64
Binary file not shown.
79 changes: 60 additions & 19 deletions SOAPEngineOSX.framework/Versions/A/Headers/SOAPEngine.h
Expand Up @@ -10,11 +10,11 @@
//
// email support: support@prioregroup.com
//
// Version : 1.41
// Version : 1.42
// Changelog : https://github.com/priore/SOAPEngine/blob/master/CHANGELOG.txt
// Updates : https://github.com/priore/SOAPEngine
//
#define SOAPEngineFrameworkVersion @"1.41" DEPRECATED_MSG_ATTRIBUTE("SOAPEngineFrameworkVersion as deprecated please use SOAPEngine64VersionString")
#define SOAPEngineFrameworkVersion @"1.42" DEPRECATED_MSG_ATTRIBUTE("SOAPEngineFrameworkVersion as deprecated please use SOAPEngine64VersionString")

#import <Foundation/Foundation.h>

Expand All @@ -31,6 +31,8 @@
FOUNDATION_EXPORT const unsigned char SOAPEngineOSXVersionString[];
#endif

#pragma mark - Notification Constants

// Local Notification names
FOUNDATION_EXPORT NSString *const SOAPEngineDidFinishLoadingNotification;
FOUNDATION_EXPORT NSString *const SOAPEngineDidFailWithErrorNotification;
Expand All @@ -40,6 +42,8 @@ FOUNDATION_EXPORT NSString *const SOAPEngineDidBeforeParsingResponseStringNotifi
FOUNDATION_EXPORT NSString *const SOAPEngineDidReceiveDataSizeNotification;
FOUNDATION_EXPORT NSString *const SOAPEngineDidSendDataSizeNotification;

#pragma mark - Notifications Keys Constants

// UserInfo dictionary keys for Local Noficiations
FOUNDATION_EXPORT NSString *const SOAPEngineStatusCodeKey; // response status code
FOUNDATION_EXPORT NSString *const SOAPEngineXMLResponseKey; // response xml
Expand All @@ -51,6 +55,8 @@ FOUNDATION_EXPORT NSString *const SOAPEngineErrorKey; // errors
FOUNDATION_EXPORT NSString *const SOAPEngineDataSizeKey; // send/receive data size
FOUNDATION_EXPORT NSString *const SOAPEngineTotalDataSizeKey; // send/receive total data size

#pragma mark - Blocks Defines

typedef void(^SOAPEngineCompleteBlockWithDictionary)(NSInteger statusCode, NSDictionary *dict);
typedef void(^SOAPEngineCompleteBlock)(NSInteger statusCode, NSString *stringXML)
DEPRECATED_MSG_ATTRIBUTE("SOAPEngineCompleteBlock as deprecated please use SOAPEngineCompleteBlockWithDictionary");
Expand All @@ -61,6 +67,8 @@ typedef void(^SOAPEngineSendDataSizeBlock)(NSUInteger current, NSUInteger total)
typedef void(^SOAPEngineReceivedProgressBlock)(NSProgress *progress);
typedef void(^SOAPEngineSendedProgressBlock)(NSProgress *progress);

#pragma mark - Enums

typedef NS_ENUM(NSInteger, SOAPVersion)
{
VERSION_1_1,
Expand Down Expand Up @@ -99,6 +107,8 @@ typedef NS_ENUM(NSInteger, SOAPCertificate)

@interface SOAPEngine : NSObject

#pragma mark - Properties

// return the current request URL
@property (nonatomic, strong, readonly) NSURL *currentRequestURL;
@property (nonatomic, strong, readonly, getter=currentRequestURL) NSURL *requestURL
Expand Down Expand Up @@ -222,9 +232,13 @@ typedef NS_ENUM(NSInteger, SOAPCertificate)
// sets the receiver of the delegates
@property (nonatomic, weak) id<SOAPEngineDelegate> delegate;

#pragma mark - Static Methods

+ (SOAPEngine *)sharedInstance;
+ (SOAPEngine *)manager;

#pragma mark - Methods

// returns the value for a webservice that returns a single value
- (NSInteger)integerValue;
- (float)floatValue;
Expand Down Expand Up @@ -268,6 +282,26 @@ typedef NS_ENUM(NSInteger, SOAPCertificate)
// clear all parameters, usually used before a new request with the same instance.
- (void)clearValues;

// sets logins
- (void)login:(NSString*)username
password:(NSString*)password;

- (void)login:(NSString*)username
password:(NSString*)password
realm:(NSString*)realm;

- (void)login:(NSString*)username
password:(NSString*)password
authorization:(SOAPAuthorization)authorization;

// for PAYPAL login
- (void)login:(NSString*)username
password:(NSString*)password
email:(NSString*)email
signature:(NSString*)signature;

#pragma mark - Request with delegates

// webservice request (async)
- (void)requestURL:(id)asmxURL soapAction:(NSString*)soapAction;
- (void)requestURL:(id)asmxURL soapAction:(NSString*)soapAction value:(id)value;
Expand All @@ -278,6 +312,8 @@ typedef NS_ENUM(NSInteger, SOAPCertificate)
- (NSDictionary*)syncRequestURL:(id)asmxURL soapAction:(NSString*)soapAction value:(id)value error:(NSError**)error;
- (NSDictionary*)syncRequestURL:(id)asmxURL soapAction:(NSString*)soapAction value:(id)value forKey:(NSString*)key error:(NSError**)error;

#pragma mark - Request with blocks

// webservice request with block
- (void)requestURL:(id)asmxURL
soapAction:(NSString *)soapAction
Expand Down Expand Up @@ -372,47 +408,52 @@ completeWithDictionary:(SOAPEngineCompleteBlockWithDictionary)complete
receivedProgress:(SOAPEngineReceivedProgressBlock)receive
sendedProgress:(SOAPEngineSendedProgressBlock)sended;

#pragma mark - Request with block (Reflection)

// request with object reflection
//- (void)requestURL:(id)asmxURL
// soapAction:(NSString *)soapAction
// class:(Class)classType
//completeWithObject:(void(^)(NSInteger statusCode, id object))complete
// failWithError:(SOAPEngineFailBlock)fail;

#pragma mark - Request with WSDL

// request with WSDL
// note: better use requestURL, read this https://github.com/priore/SOAPEngine#optimizations
- (void)requestWSDL:(id)wsdlURL operation:(NSString*)operation;
- (void)requestWSDL:(id)wsdlURL operation:(NSString*)operation
DEPRECATED_MSG_ATTRIBUTE("requestWSDL:operation: as deprecated please use requestURL:soapAction:");

- (void)requestWSDL:(id)wsdlURL
operation:(NSString *)operation
completeWithDictionary:(SOAPEngineCompleteBlockWithDictionary)complete
failWithError:(SOAPEngineFailBlock)fail;
failWithError:(SOAPEngineFailBlock)fail
DEPRECATED_MSG_ATTRIBUTE("requestWSDL:operation:completeWithDictionary:failWithError: as deprecated please use requestURL:soapAction:completeWithDictionary:failWithError:");

- (void)requestWSDL:(id)wsdlURL
operation:(NSString *)operation
value:(id)value
completeWithDictionary:(SOAPEngineCompleteBlockWithDictionary)complete
failWithError:(SOAPEngineFailBlock)fail;
failWithError:(SOAPEngineFailBlock)fail
DEPRECATED_MSG_ATTRIBUTE("requestWSDL:operation:value:completeWithDictionary:failWithError: as deprecated please use requestURL:soapAction:value:completeWithDictionary:failWithError:");

- (void)requestWSDL:(id)wsdlURL
operation:(NSString *)operation
value:(id)value
forKey:(NSString*)key
completeWithDictionary:(SOAPEngineCompleteBlockWithDictionary)complete
failWithError:(SOAPEngineFailBlock)fail;
failWithError:(SOAPEngineFailBlock)fail
DEPRECATED_MSG_ATTRIBUTE("requestWSDL:operation:value:forKey:completeWithDictionary:failWithError: as deprecated please use requestURL:soapAction:value:forKey:completeWithDictionary:failWithError:");

// sets logins
- (void)login:(NSString*)username
password:(NSString*)password;

- (void)login:(NSString*)username
password:(NSString*)password
authorization:(SOAPAuthorization)authorization;

// for PAYPAL login
- (void)login:(NSString*)username
password:(NSString*)password
email:(NSString*)email
signature:(NSString*)signature;
#pragma mark - Cancel all requests

// cancel all delegates, blocks or notifications
- (void)cancel;

@end

#pragma mark - Protocol

@protocol SOAPEngineDelegate <NSObject>

@optional
Expand Down

0 comments on commit 54c3f83

Please sign in to comment.