Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSURL *url = [NSURL URLWithString:@"http://w3schools.com/webservices/tempconvert.asmx"];
- NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url]
- NSString *msgLength = [NSString stringWithFormat:@"%d", [soapMessage length]];
- [theRequest addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
- [theRequest addValue: @"http://tempuri.org/CelsiusToFahrenheit" forHTTPHeaderField:@"SOAPAction"];
- [theRequest addValue: msgLength forHTTPHeaderField:@"Content-Length"];
- [theRequest setHTTPMethod:@"POST"];
- [theRequest setHTTPBody: [soapMessage dataUsingEncoding:NSUTF8StringEncoding]];
- NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
- if( theConnection )
- {
- webData = [[NSMutableData data] retain];
- }
- else
- {
- NSLog(@"theConnection is NULL");
- }
- for()
- {
- newSize = oldSize++;
- newStr = malloc(newSize);
- newStr = strcat(oldStr, newCharStr);
- free(oldStr);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement