首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Iphone >

一个代理有关问题

2012-12-17 
弱弱的问一个代理问题如://头文件#import UIKit/UIKit.h#import ServiceHelper.h@class BulletSoapMes

弱弱的问一个代理问题
如:


//头文件
#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方法,同样实现的是这个协议,似乎会报错??
求大神解决方案

[解决办法]
没明白你什么意思
[解决办法]
你给一下出错的代码吧。

我也不太明白你说的什么意思。
[解决办法]
调试下,看看在哪里异常的
[解决办法]

-(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事件执行时会提示错误请求

热点排行