Web Service iPhone问题参数库wsdl2objc和Sudz

时间:2011-08-18 11:07:14

标签: objective-c web-services jboss xcode sudzc

使用webservices和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得到arg0 = null

0 个答案:

没有答案