【发布时间】:2011-10-03 05:38:22
【问题描述】:
大家好.....
I am using wsdl web service in my project.I don't know how to use it.But from the wsdl2objc i generate the wsdl into objective c form.And after that i implement it into my project.In my wsdl there are many methods like getCountryList,getCityList,getCompanyContact....etc.Now i have a problem...i mean i fetched getCityList but not all city is shown in my city list.
Now i don't know what is the problem in my code.
请告诉我一些建议......如果你理解我的问题......我的代码是......
- (SoapRequest*) getScanCustomerCompanies: (id <SoapDelegate>) handler machineId: (NSString*) machineId loc: (NSString*) loc cat: (int) cat pausefollow:(int)pausefollow favorite:(int)favorite activeontop:(int)activeontop nationwide:(int)nationwide orderby:(int)orderby
{
return [self getScanCustomerCompanies: handler action: nil machineId: machineId loc: loc cat: cat pausefollow:pausefollow favorite:favorite activeontop:activeontop nationwide:nationwide orderby:orderby];
}
- (SoapRequest*) getScanCustomerCompanies: (id) _target action: (SEL) _action machineId: (NSString*) machineId loc: (NSString*) loc cat: (int) cat pausefollow:(int)pausefollow favorite:(int)favorite activeontop:(int)activeontop nationwide:(int)nationwide orderby:(int)orderby
{
NSMutableArray* _params = [NSMutableArray array];
[_params addObject: [[[SoapParameter alloc] initWithValue: machineId forName: @"machineId"] autorelease]];
[_params addObject: [[[SoapParameter alloc] initWithValue: loc forName: @"loc"] autorelease]];
[_params addObject: [[[SoapParameter alloc] initWithValue: [NSNumber numberWithInt: cat] forName: @"cat"] autorelease]];
[_params addObject: [[[SoapParameter alloc] initWithValue:[NSNumber numberWithInt:pausefollow] forName:@"pausefollow"]autorelease]];
[_params addObject: [[[SoapParameter alloc] initWithValue:[NSNumber numberWithInt:favorite] forName:@"favorite"]autorelease]];
[_params addObject: [[[SoapParameter alloc] initWithValue:[NSNumber numberWithInt:activeontop] forName:@"activeontop"]autorelease]];
[_params addObject: [[[SoapParameter alloc] initWithValue:[NSNumber numberWithInt:nationwide] forName:@"nationwide"]autorelease]];
[_params addObject: [[[SoapParameter alloc] initWithValue:[NSNumber numberWithInt:orderby] forName:@"orderby"]autorelease]];
NSString* _envelope = [Soap createEnvelope: @"getScanCustomerCompanies" forNamespace: self.namespace withParameters: _params withHeaders: self.headers];
SoapRequest* _request = [SoapRequest create: _target action: _action service: self soapAction: @"urn:abc#getScanCustomerCompanies" postData: _envelope deserializeTo: [[SDZscanCustomerCompanies alloc] autorelease]];
[_request send];
return _request;
}
谢谢.......
【问题讨论】: