WebService iPhone问题参数库wsdl2objc和SudzC
我在使用网络服务和 iPhone 时遇到了很大的问题。 我尝试使用不同的库:wsdl2objc 和 SudzC,我也有同样的问题。
我一般化我的存根,没问题,当我使用参数调用 webservices 方法时,我的服务器没有获取参数。 我的服务器是 JBoss 服务器,wsdl 是 Java 语言。
我使用 wsdl2objc 的代码:
MobileActionsBinding *binding = [[MobileActionsBeanService MobileActionsBinding] retain];
MobileActionsBeanService_getListMobileMenuItemByMobileApplicationId *menu = [[MobileActionsBeanService_getListMobileMenuItemByMobileApplicationId alloc] init];
NSNumber *number = [[NSNumber alloc] initWithInt:15];
menu.arg0 = number;
NSLog(@"menu.arg0 : %@",menu.arg0);
MobileActionsBindingResponse *response = [binding getListMobileMenuItemByMobileApplicationIdUsingGetListMobileMenuItemByMobileApplicationId:menu];
NSArray *arrayReponse = response.bodyParts;
for(id bodypart in arrayReponse) {
if([bodypart isKindOfClass:[MobileActionsBeanService_getListMobileMenuItemByMobileApplicationIdResponse class]]) {
MobileActionsBeanService_getListMobileMenuItemByMobileApplicationIdResponse *appResponse = (MobileActionsBeanService_getListMobileMenuItemByMobileApplicationIdResponse *)bodypart;
}
if([bodypart isKindOfClass:[SOAPFault class]]) {
SOAPFault *soapFault = (SOAPFault *)bodypart;
NSLog(@"%@",soapFault.simpleFaultString);
}
}
我使用 SudzC 的代码:
SDZMobileActionsBeanService *service = [SDZMobileActionsBeanService service];
service.logging = YES;
[service getListMobileMenuItemByMobileApplicationId:self action:@selector(getApp:) arg0:15];
在两种方法中 JBoss get arg0 = null
I have a big problem using webservices and iPhone.
I try to user different library : wsdl2objc and SudzC and i have the same problem.
I general my stubs, no problem and when i call webservices methods with parameters my server don't get the parameters.
My server is a JBoss server and wsdl is in Java.
My code with wsdl2objc :
MobileActionsBinding *binding = [[MobileActionsBeanService MobileActionsBinding] retain];
MobileActionsBeanService_getListMobileMenuItemByMobileApplicationId *menu = [[MobileActionsBeanService_getListMobileMenuItemByMobileApplicationId alloc] init];
NSNumber *number = [[NSNumber alloc] initWithInt:15];
menu.arg0 = number;
NSLog(@"menu.arg0 : %@",menu.arg0);
MobileActionsBindingResponse *response = [binding getListMobileMenuItemByMobileApplicationIdUsingGetListMobileMenuItemByMobileApplicationId:menu];
NSArray *arrayReponse = response.bodyParts;
for(id bodypart in arrayReponse) {
if([bodypart isKindOfClass:[MobileActionsBeanService_getListMobileMenuItemByMobileApplicationIdResponse class]]) {
MobileActionsBeanService_getListMobileMenuItemByMobileApplicationIdResponse *appResponse = (MobileActionsBeanService_getListMobileMenuItemByMobileApplicationIdResponse *)bodypart;
}
if([bodypart isKindOfClass:[SOAPFault class]]) {
SOAPFault *soapFault = (SOAPFault *)bodypart;
NSLog(@"%@",soapFault.simpleFaultString);
}
}
My code with SudzC :
SDZMobileActionsBeanService *service = [SDZMobileActionsBeanService service];
service.logging = YES;
[service getListMobileMenuItemByMobileApplicationId:self action:@selector(getApp:) arg0:15];
In two methods JBoss get arg0 = null
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论