sudzC handle parameters
I m just started a new project which requires communication with a soap webservice developped by another company
The functions requires some paramters ex:
TPLogin
parameters required:
SLogin=XXX
SPassword=XXX
my question is :
how do I pass theses parameters , as exemple provided with generated code only call the functions without any params ?
from exemple code generated;
[service TPLogin:self action:@selector(TPLoginHandler:)];
// Handle the respo开发者_JAVA技巧nse from TPLogin.
- (void) TPLoginHandler: (id) value {
// Handle errors
if([value isKindOfClass:[NSError class]]) {
NSLog(@"%@", value);
return;
}
// Handle faults
if([value isKindOfClass:[SoapFault class]]) {
NSLog(@"%@", value);
return;
}
// Do something with the NSString* result
NSString* result = (NSString*)value;
NSLog(@"TPLogin returned the value: %@", result);
}
what is 'service'?
[self performSelector:@selector(TPLoginHandler:) withObject:[NSDictionary dictionaryWithObjectsAndKeys:@"blarblar",@"SLogin", @"blarblar",@"SPassword", nil]];
-(void)TPLoginHandler:(NSDictionary *)info
{
//you can access about below code.
[info valueForKey:@"SLogin"];
[info valueForKey:@"SPassword"];
}
精彩评论