where exactly do we need exception handling for web-services on iPhone
I am a new iPhone developer and totally new to web-services as well. I had used http:开发者_C百科//www.sudzc.com/ to develop my obj-c code for my wsdl. I need to know that where exactly i need to handle exceptions in this code? Or the code generated by sudz itself takes care of the exception handling itself?
Look at the example code generated for your web service. They give you the generic layout for the error handlers. Should look something like this:
// Handle the response from webserviceConnection.
(void) webserviceConnectionHandler: (BOOL) value {
// Do something with the BOOL result
NSLog(@"webserviceConnection returned the value: %@", [NSNumber numberWithBool:value]);
}
Generally the proxy classes from the WSDL has selector methods which gets called,when you do some operation/method call. So you just need to check it out what method (from service level) you are going to call and implement the selector method in your class.
精彩评论