How to return object from action

152 Views Asked by At

I am trying to work with sudzc.com soap client.

This is how I invoke my web service:

Example_ManagerService* soapService = [[CCExample_ManagerService alloc] init];
[soapService getVehicle:self action:@selector(getVehicleHandler:) id: currentVeh_id.intValue];

Now this is calling getVehicle and passing the result to the action getVehicleHandler. So far so good. However, is there a possibility to get the result back from the getVehicleHandler function? currently it is returning void:

- (void) getVehicleHandler: (id) value {

I would like to not do all the work in the handler but pass the object back to the calling object.

How do I do that?

1

There are 1 best solutions below

1
On

Instead of returning a value you can set the object inside the handler

- (void) getVehicleHandler: (id) value {
        ...do your staff...
        myObject=myNewValueForMyObject
}