Take a look at NSURLConnection. You essentially create a connection, register a delegate, kick off the request and build the response as the data is passed to your delegate.
I'm working from memory here, but essentially:
- Create an NSURLRequest for your request to your server
- Create an NSURLConnection using the initWithRequest:(NSURLRequest *)request delegate:(id)delegate init method, passing a suitable delegate.
The request will be made, and the response will be passed back to your delegate in:
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
I've not tested this, but something like:
NSMutableURLRequest * request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"SERVER"]
[request setHTTPMethod:@"POST"];
[request setHTTPBody:@"Your XML"];
NSURLConnection * conn = [[NSURLConnection alloc] initWithRequest:request delegate:self];
Then in your delegate you can build the response using the data provided in the didReceiveData:(NSData *)data and didReceiveResponse:(NSURLResponse *)response methods.