Web サービスと 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];
2 つのメソッドで JBoss は arg0 = null を取得します