如:
//头文件
#import <UIKit/UIKit.h>
#import "ServiceHelper.h"
@class BulletSoapMessage;
@interface HttpRequestViewController : UIViewController<ServiceHelperDelegate> {
    ServiceHelper *helper;
BulletSoapMessage *msgHelper;
}
-(IBAction)buttonServiceClick:(id)sender;
@end
//实现文件(省略部分内容)
//ServiceHelperDelegate实现的方法
-(void)finishSuccessRequest:(NSString*)responseText responseData:(NSData*)requestData{
NSLog(@"\n%@",responseText);
}
-(void)finishFailRequest:(NSError*)error{
NSLog(@"bbbbbbbbbbbbbbbb");
NSLog(@"%@",[error description]);
}
似乎这个页面调用多个方法都实现delegate会报错?
比如我调用A方法时,可以delegte里面可以正确返回结果,当我调用B方法,同样实现的是这个协议,似乎会报错〜〜
求大神解决方案

解决方案 »

  1.   


    -(IBAction)buttonServiceClick:(id)sender{
    NSString *soapMsg=@"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
    "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n"
    "<soap:Body><GetCircular xmlns=\"http://tempuri.org/\" ><guid>07122d99-0978-46e4-aacb-3aed0ff99cb5</guid><pwd>123456</pwd><GetCircular></soap:Body></soap:Envelope>";

    ASIHTTPRequest *request=[self ServiceRequestUrl:@"GetCircular" SoapMessage:soapMsg];
    [request setDelegate:self];
    [request startAsynchronous];//异步请求
    }
    buttonServiceClick事件执行时会提示错误请求