【iOS SOAP】基于第三方开源项目:wsdl2objc

ViewController ()@end@implementation ViewController@synthesize nameTextField = mNameTextField, messageTextView = mMessageTextView;- (void)viewDidLoad {[super viewDidLoad];// Do any additional setup after loading the view, typically from a nib.}- (IBAction)sendButtonPressed:(id)sender {IHelloWorldServiceBinding *binding = [IHelloWorldService IHelloWorldServiceBinding];IHelloWorldService_say *say = [[IHelloWorldService_say new] autorelease];say.arg0 = [mNameTextField text];[binding sayAsyncUsingSay:say delegate:self];}- (void)operation:(IHelloWorldServiceBindingOperation *)operation completedWithResponse:(IHelloWorldServiceBindingResponse *)response {NSArray *responseHeaders = response.headers;NSArray *responseBodyParts = response.bodyParts;for(id header in responseHeaders) {// here do what you want with the headers, if there’s anything of value in them }for(id bodyPart in responseBodyParts) {if ([bodyPart isKindOfClass:[SOAPFault class]]) {//continue;}if([bodyPart isKindOfClass:[IHelloWorldService_sayResponse class]]) {IHelloWorldService_sayResponse *body = (IHelloWorldService_sayResponse*)bodyPart;NSString *text = body.return_;mMessageTextView.text = [NSString stringWithFormat:, mMessageTextView.text, text];continue;}}}@end

,所有的胜利,与征服自己的胜利比起来,都是微不足道

【iOS SOAP】基于第三方开源项目:wsdl2objc

相关文章:

你感兴趣的文章:

标签云: