You can HTTP POST it:
NSString * xmlString = @"<test><message length="5">Hello</message></test>";
NSURL * serviceUrl = [NSURL URLWithString:@"http://my.company.com/myservice"];
NSMutableURLRequest * serviceRequest = [NSMutableURLRequest requestWithURL:serviceUrl];
[serviceRequest setValue:@"text/xml" forHTTPHeaderField:@"Content-type"];
[serviceRequest setHTTPMethod:@"POST"];
[serviceRequest setHTTPBody:[xmlString dataUsingEncoding:NSASCIIStringEncoding]];
NSURLResponse * serviceResponse;
NSError * serviceError;
serviceResponse = [NSURLConnection sendSynchronousRequest:serviceRequest returningResponse:&serviceResponse error:&serviceError];
You can also set other HTTP Header such as content-length the same way.
Hope this helps,
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…