如果我在这个框架中有自定义值对象,我该怎么办?我已经声明并定义了 LoginRequest 和 LoginResponse 的接口和实现,并且声明了 LoginRequest 和 LoginResponse 的协议。我在我的代码中找不到错误。代码如下:
//mycode
NSURL* url = [NSURL URLWithString:myurl];
id<BusinessAPI> proxy = (id<BusinessAPI>)[CWHessianConnection rootProxyWithServiceURL:url protocol:@protocol(BusinessAPI)];
LoginRequest* loginRequest = [[LoginRequest alloc] init];
loginRequest.mobileNum = @"123456789";//number.text;
loginRequest.mobileType = @"iphone";
loginRequest.password = @"123";//password.text;
LoginResponse *loginResponse = [proxy loginBusiness:loginRequest];
if (loginResponse.login) NSLog(@"YES");
else NSLog(@"NO");
日志是“参数类型不匹配”
结果是 Web 服务器找不到远程 LoginRequest 对象。有任何想法吗?多谢