sudzC handle parameters

410 Views Asked by At

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);

}
1

There are 1 best solutions below

1
On

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