I'm fairly new to iOS development and want to send a request message to a web service that I created in PHP. It will take the XML request, process and then provide a response XML message.
However, the issue I'm having is that when sending data to the Webservice it is in NSData form.
NSLog of the data being sent is:
<3c3f786d 6c207665 7273696f etc etc ... 743e>
However the PHP script is expecting an XML message like this:
<?xml version="1.0" ?><request-message><tag-1></tag-1><tag-2></tag-2></request-message>
So my question is, is there a way of sending the XML without converting to data, or is there a way to convert the NSData string to readable XML on the PHP Server Side?
Thanks in advance.
Pazzy
EDIT: To include request code:
// Construct the webservice URL
NSURL *url = [NSURL URLWithString:@"http://localhost/web/check_data.php"];
NSString *requestXML = @"<?xml version='1.0'?><request-message><tag-1>VALUE1</tag-1><tag-2>VALUE2</tag-2></request-message>";
NSData *data = [requestXML dataUsingEncoding:NSUTF8StringEncoding];
// Create a request object with that URL
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30];
[request setHTTPBody:data];
[request setHTTPMethod:@"POST"];