Objective-C调用Web Service示例因为有的Web Service参数要求有顺序,所以参数用了NSArray+ (NSData *) SoapCall:(NSString *)method PostData:(NSString *)post
{
NSData *postData = [post dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO];
NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];
[postData autorelease];
NSString *soapAction = [NSString stringWithFormat:@"%s/%@",SoapPrefix , method ];
NSURL *url=[[NSURL alloc]initWithString:[ [ NSString alloc ] initWithUTF8String: SoapURL ] ];
NSMutableURLRequest *request=[[NSMutableURLRequest alloc]init];
...
继续阅读
(27)