简体   繁体   中英

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 response 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"];
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM