Revision: 28199
http://sourceforge.net/p/bibdesk/svn/28199
Author: hofman
Date: 2023-03-29 16:59:27 +0000 (Wed, 29 Mar 2023)
Log Message:
-----------
get soap binding from the request, should be determined by that
Modified Paths:
--------------
trunk/bibdesk/BDSKISIGroupServer.m
trunk/bibdesk/BDSKSoapBinding.h
trunk/bibdesk/BDSKSoapBinding.m
trunk/bibdesk/WOKMWSAuthenticateService.m
trunk/bibdesk/WokSearchLiteService.m
trunk/bibdesk/WokSearchService.m
Modified: trunk/bibdesk/BDSKISIGroupServer.m
===================================================================
--- trunk/bibdesk/BDSKISIGroupServer.m 2023-03-29 16:34:32 UTC (rev 28198)
+++ trunk/bibdesk/BDSKISIGroupServer.m 2023-03-29 16:59:27 UTC (rev 28199)
@@ -271,20 +271,19 @@
// if we did not have a session we need to start one
state = BDSKWOKStateAuthenticate;
- WOKMWSAuthenticateService *binding = [WOKMWSAuthenticateService
soapBinding];
- //binding.logXMLInOut = YES;
+ WOKMWSAuthenticateService_authenticate *authRequest =
[[[WOKMWSAuthenticateService_authenticate alloc] init] autorelease];
+
+ [operation cancel];
+ [operation release];
+ operation = [[BDSKSoapBindingOperation alloc]
initWithParameters:authRequest delegate:self];
+
NSString *user = nil;
NSString *password = nil;
if ([serverInfo getUsername:&user password:&password]) {
- [binding setAuthUsername:user];
- [binding setAuthPassword:password];
+ [[operation binding] setAuthUsername:user];
+ [[operation binding] setAuthPassword:password];
}
- WOKMWSAuthenticateService_authenticate *authRequest =
[[[WOKMWSAuthenticateService_authenticate alloc] init] autorelease];
-
- [operation cancel];
- [operation release];
- operation = [[BDSKSoapBindingOperation alloc] initWithBinding:binding
delegate:self parameters:authRequest];
[operation start];
}
}
@@ -314,18 +313,12 @@
// noting to do, should not get here
state = BDSKWOKStateIdle;
} else {
- BDSKSoapBinding *binding = nil;
-
if ([serverInfo isLite]) {
- binding = [WokSearchLiteService soapBinding];
-
WokSearchLiteService_retrieveParameters *retrieveParameters =
[[[WokSearchLiteService_retrieveParameters alloc] init] autorelease];
[retrieveParameters setFirstRecord:[NSNumber
numberWithInteger:fetchedResults + 1]];
[retrieveParameters setCount:[NSNumber
numberWithInteger:numResults]];
[(WokSearchLiteServiceRequest *)request
setRetrieveParameters:retrieveParameters];
} else {
- binding = [WokSearchService soapBinding];
-
WokSearchService_retrieveParameters *retrieveParameters =
[[[WokSearchService_retrieveParameters alloc] init] autorelease];
[retrieveParameters setFirstRecord:[NSNumber
numberWithInteger:fetchedResults + 1]];
[retrieveParameters setCount:[NSNumber
numberWithInteger:numResults]];
@@ -332,12 +325,10 @@
[(WokSearchServiceRequest *)request
setRetrieveParameters:retrieveParameters];
}
- [binding addCookie:sessionCookie];
- //binding.logXMLInOut = YES;
-
[operation cancel];
[operation release];
- operation = [[BDSKSoapBindingOperation alloc]
initWithBinding:binding delegate:self parameters:request];
+ operation = [[BDSKSoapBindingOperation alloc]
initWithParameters:request delegate:self];
+ [[operation binding] addCookie:sessionCookie];
[operation start];
}
}
@@ -346,10 +337,9 @@
- (void)closeSession {
// close the session
@try {
- WOKMWSAuthenticateService *binding = [WOKMWSAuthenticateService
soapBinding];
WOKMWSAuthenticateService_closeSession *closeSessionRequest =
[[[WOKMWSAuthenticateService_closeSession alloc] init] autorelease];
- [binding addCookie:sessionCookie];
- BDSKSoapBindingOperation *closeOperation = [[[BDSKSoapBindingOperation
alloc] initWithBinding:binding delegate:nil parameters:closeSessionRequest]
autorelease];
+ BDSKSoapBindingOperation *closeOperation = [[[BDSKSoapBindingOperation
alloc] initWithParameters:closeSessionRequest delegate:nil] autorelease];
+ [[closeOperation binding] addCookie:sessionCookie];
[closeOperation start];
[closeOperation waitUntilExit];
}
Modified: trunk/bibdesk/BDSKSoapBinding.h
===================================================================
--- trunk/bibdesk/BDSKSoapBinding.h 2023-03-29 16:34:32 UTC (rev 28198)
+++ trunk/bibdesk/BDSKSoapBinding.h 2023-03-29 16:59:27 UTC (rev 28199)
@@ -56,7 +56,7 @@
@property (nonatomic, assign) id<BDSKSoapBindingOperationDelegate> delegate;
@property (nonatomic, retain) BDSKDownload *download;
- (id)initWithBinding:(BDSKSoapBinding *)aBinding
delegate:(id<BDSKSoapBindingOperationDelegate>)aDelegate soapAction:(NSString
*)aSoapAction bodyElements:(NSDictionary *)aBodyElements
responseClasses:(NSDictionary *)aResponseClasses;
-- (id)initWithBinding:(BDSKSoapBinding *)aBinding
delegate:(id<BDSKSoapBindingOperationDelegate>)aDelegate
parameters:(BDSKSoapBindingRequest *)parameters;
+- (id)initWithParameters:(BDSKSoapBindingRequest *)parameters
delegate:(id<BDSKSoapBindingOperationDelegate>)aDelegate;
- (void)start;
- (void)waitUntilExit;
- (void)cancel;
@@ -84,6 +84,7 @@
}
@property (nonatomic, readonly) NSString *elementName;
@property (nonatomic, readonly) NSDictionary *responseClasses;
+@property (nonatomic, readonly) BDSKSoapBinding *binding;
@end
@interface BDSKSoapBinding_fault : BDSKSoapBindingElement {
Modified: trunk/bibdesk/BDSKSoapBinding.m
===================================================================
--- trunk/bibdesk/BDSKSoapBinding.m 2023-03-29 16:34:32 UTC (rev 28198)
+++ trunk/bibdesk/BDSKSoapBinding.m 2023-03-29 16:59:27 UTC (rev 28199)
@@ -162,8 +162,9 @@
return self;
}
-- (id)initWithBinding:(BDSKSoapBinding *)aBinding
delegate:(id<BDSKSoapBindingOperationDelegate>)aDelegate
parameters:(BDSKSoapBindingRequest *)parameters
+- (id)initWithParameters:(BDSKSoapBindingRequest *)parameters
delegate:(id<BDSKSoapBindingOperationDelegate>)aDelegate
{
+ BDSKSoapBinding *aBinding = [parameters binding];
NSDictionary *aBodyElements = [NSDictionary
dictionaryWithObjectsAndKeys:parameters, [parameters elementName], nil];
NSDictionary *aResponseClasses = [parameters responseClasses];
return [self initWithBinding:aBinding delegate:aDelegate soapAction:@""
bodyElements:aBodyElements responseClasses:aResponseClasses];
@@ -396,6 +397,10 @@
NSString *responseName = [self.elementName
stringByAppendingString:@"Response"];
return [NSDictionary dictionaryWithObjectsAndKeys:responseClass,
responseName, nil];
}
+- (BDSKSoapBinding *)binding
+{
+ return [BDSKSoapBinding soapBinding];
+}
@end
@implementation BDSKSoapBinding_fault
Modified: trunk/bibdesk/WOKMWSAuthenticateService.m
===================================================================
--- trunk/bibdesk/WOKMWSAuthenticateService.m 2023-03-29 16:34:32 UTC (rev
28198)
+++ trunk/bibdesk/WOKMWSAuthenticateService.m 2023-03-29 16:59:27 UTC (rev
28199)
@@ -1,6 +1,10 @@
#import "WOKMWSAuthenticateService.h"
@implementation WOKMWSAuthenticateService_authenticate
+- (BDSKSoapBinding *)binding
+{
+ return [WOKMWSAuthenticateService soapBinding];
+}
@end
@implementation WOKMWSAuthenticateService_authenticateResponse
@@ -34,6 +38,10 @@
@end
@implementation WOKMWSAuthenticateService_closeSession
+- (BDSKSoapBinding *)binding
+{
+ return [WOKMWSAuthenticateService soapBinding];
+}
@end
@implementation WOKMWSAuthenticateService_closeSessionResponse
Modified: trunk/bibdesk/WokSearchLiteService.m
===================================================================
--- trunk/bibdesk/WokSearchLiteService.m 2023-03-29 16:34:32 UTC (rev
28198)
+++ trunk/bibdesk/WokSearchLiteService.m 2023-03-29 16:59:27 UTC (rev
28199)
@@ -109,6 +109,10 @@
[super dealloc];
}
@synthesize retrieveParameters;
+- (BDSKSoapBinding *)binding
+{
+ return [WokSearchLiteService soapBinding];
+}
@end
@implementation WokSearchLiteService_retrieve
Modified: trunk/bibdesk/WokSearchService.m
===================================================================
--- trunk/bibdesk/WokSearchService.m 2023-03-29 16:34:32 UTC (rev 28198)
+++ trunk/bibdesk/WokSearchService.m 2023-03-29 16:59:27 UTC (rev 28199)
@@ -223,6 +223,10 @@
[super dealloc];
}
@synthesize retrieveParameters;
+- (BDSKSoapBinding *)binding
+{
+ return [WokSearchService soapBinding];
+}
@end
@implementation WokSearchService_citedReferences
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit