Advertisement
Guest User

Untitled

a guest
Jun 10th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // NSString category
  2. //
  3. @interface NSString (base64)
  4. - (NSString*) encodeWithBase64;
  5. + (NSString*) stringInBase64: (NSString*) string;
  6. @end
  7.  
  8.  
  9. // SCSoapClient interface
  10. //
  11. @interface SCSoapClient : NSObject
  12. @property (retain) NSString* login;
  13. @property (retain) NSString* url;
  14. @property (retain) NSString* NameSpace;
  15.  
  16. - (void) setLoginUser: (NSString*) user withPassword: (NSString*) password;
  17. - (NSMutableURLRequest*) executeAction: (NSString*) action withValue: (NSString*) value withValueType: (NSString*) type;
  18. + (NSXMLDocument*) createSOAPRequest: (NSString*) namespace withAction: (NSString*) action withValue: (NSString*) value withValueType: (NSString*) type;
  19. @end
  20.  
  21. // setLoginUser: withPassword: implementation
  22. //
  23. - (void) setLoginUser: (NSString*) user withPassword: (NSString*) password {
  24.     login = [[NSString stringWithFormat:@"%@:%@",user,password] encodeWithBase64];
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement