安卓与IOS通过hessian接口实现用友系统移动手机订单5苹果手机开发
2013-08-22 16:40
1081 查看
五:苹果手机开发
1:以客户数据为例,在.h文件中声明Delegate,对应hessian服务器端的客户接口,参数要数量一致。
@protocol HesGetCustomerListDelegate <NSObject>
- (NSString *)getCustomerListWithUserID:(NSString *)userID andKeyWords:(NSString *)key andPage:(int )page andPageSize:(int )psize;
@end
2:Delegate方法的声明
@property (nonatomic, strong) id<HesGetCustomerListDelegate> hesContactGetList;
3:需要导入#import "JSON.h"
4:客户数据的获取
NSException *exp = nil;
int oldCnt = [arrList count];
NSURL *url = [NSURL URLWithString:SERV_URL];//SERV_URL和安卓端url是一样的
NSString *str=@"";
[CWHessianArchiver setMethodName:@"CustomerList" forSelector:aSelector];
self.hesContactGetList = (id<HesGetCustomerListDelegate>)[CWHessianConnection proxyWithURL:url
protocol:@protocol(HesGetCustomerListDelegate)];
@try {
str = [self.hesContactGetList getCustomerListWithUserID:[[NSUserDefaults standardUserDefaults] valueForKey:UID] andKeyWords:@""
andPage:curPage andPageSize:pageSize];
}
@catch (NSException *exception) {
exp = exception;
}
if (exp) {
NSLog(@"%@",exp.description);
[SVProgressHUD showErrorWithStatus:@"获取列表失败" duration:1.6f];
}
else {
NSArray *arr = [str JSONValue];
[arrList addObjectsFromArray:arr];
}
arrList 里边就包含客户的数据。
1:以客户数据为例,在.h文件中声明Delegate,对应hessian服务器端的客户接口,参数要数量一致。
@protocol HesGetCustomerListDelegate <NSObject>
- (NSString *)getCustomerListWithUserID:(NSString *)userID andKeyWords:(NSString *)key andPage:(int )page andPageSize:(int )psize;
@end
2:Delegate方法的声明
@property (nonatomic, strong) id<HesGetCustomerListDelegate> hesContactGetList;
3:需要导入#import "JSON.h"
4:客户数据的获取
NSException *exp = nil;
int oldCnt = [arrList count];
NSURL *url = [NSURL URLWithString:SERV_URL];//SERV_URL和安卓端url是一样的
NSString *str=@"";
[CWHessianArchiver setMethodName:@"CustomerList" forSelector:aSelector];
self.hesContactGetList = (id<HesGetCustomerListDelegate>)[CWHessianConnection proxyWithURL:url
protocol:@protocol(HesGetCustomerListDelegate)];
@try {
str = [self.hesContactGetList getCustomerListWithUserID:[[NSUserDefaults standardUserDefaults] valueForKey:UID] andKeyWords:@""
andPage:curPage andPageSize:pageSize];
}
@catch (NSException *exception) {
exp = exception;
}
if (exp) {
NSLog(@"%@",exp.description);
[SVProgressHUD showErrorWithStatus:@"获取列表失败" duration:1.6f];
}
else {
NSArray *arr = [str JSONValue];
[arrList addObjectsFromArray:arr];
}
arrList 里边就包含客户的数据。
相关文章推荐
- 安卓与IOS通过hessian接口实现用友系统移动手机订单4安卓手机开发
- 安卓与IOS通过hessian接口实现用友系统移动手机订单2服务器端Servlet实现
- 安卓与IOS通过hessian接口实现用友系统移动手机订单3JDBC跨数据库库事务处理
- 安卓与IOS通过hessian接口实现用友系统移动手机订单1JAVA连接sql2005数据库
- [置顶] 困扰:微信开发 安卓和IOS下 对JSON格式解析 导致苹果手机sinature签名无效的问题
- php项目有负载,$_SERVER['HTTP_X_FORWARDED_FOR']函数在不同系统中获取到的值形式不一样,ios系统苹果手机只能获取到一个ip(113.87.214.xxx),而安卓手机获取到的是2个ip中间逗号隔开的形式(113.87.214.xxx , xxx.xxx.xxx.xxx)
- 苹果安卓承包移动整片鱼塘推android/IOS开发进化
- 安卓(Android)+苹果(Ios)仿微信、陌陌 移动社交APP系统源码,手机IM聊天软件源码,企业即时通讯APP程序源码
- iOS开发在js中调用oc可以实现在HTML5中调用手机系统的相册,拍照等。
- 开发 通过接口 app ios或者是安卓 app 一起用的注意事项
- 通过判断浏览器的userAgent,用正则来判断手机是否是ios(苹果)和Android(安卓)客户端
- ios开发——代码实现获得手机系统的名字和版本号&当前网络状态
- 安卓开发扩展(一)通过手机系统相册选择图片
- 移动web判断手机系统是安卓还是ios的解决办法
- iOS版移动和地图与高德地图差异化开发实现
- 手机版WEB开发经验分享,手机版网站开发注意事项,网站自适应,手机版网站自适应,移动安卓APP自适应
- 基于Android手机开发平台的移动数字图书馆服务系统研究
- 把苹果iPhone手机传文件传给安卓系统手机
- 安卓仿手机QQ消息BadgeView气泡跟随手指移动,并实现进出动画效果。
- IOS 特定于设备的开发:获取和使用设备姿势(通过手机方向控制3d物体显示)