弱弱的问一个代理问题
如:
//头文件
#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]);
}
-(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];//异步请求
}