This article reprinted to http://blog.csdn.net/remote_roamer/article/details/7105776
- The code that throws the error
[CPP]View Plaincopy < param name= "wmode" value= "Transparent" >
- Throws an error if the returned message is an error message
- if ([outparams Count] <= 0)
- {
- [NSException raise:@"WebService error" format:@"%@", Returnjson4soap];
- }
- Capturing the error code in the call
[CPP]View Plaincopy
- Parsing the Cusotmerdetail object from the SOAP message
- @Try
- {
- Customerdetail = [[[Soaprtnjsonparser alloc] init] parse2customerdtail:[returnsoapxml datausingencoding: Nsutf8stringencoding]];
- }@catch (NSException * e) {
- NSLog (@"Exception:%@", e);
- Uialertview * Alert =
- [[Uialertview Alloc]
- initwithtitle:@"Error"
- Message: [[NSString alloc] initwithformat:@"%@", E]
- Delegate:self
- Cancelbuttontitle:nil
- otherbuttontitles:@"OK", nil];
- [Alert show];
- [Alert release];
- return;
- }