On searching for LG TV through UPnP/SSDP, I get below response:
HTTP/1.1 200 OK
CACHE-CONTROL: max-age=172800
DATE: Mon Dec 16 06:31:03 2013 GMT
EXT:
LOCATION: http://<IP>:<PORT>/udap/api/data?target=rootservice.xml
SERVER: Linux/3.0.13 UDAP/1.0 47LN5750-UH/05.00.30
ST: udap:rootservice
USN: uuid:c8ffxxxx-xxxx-xxxx-xxxx-xxxx34b4c708::udap:rootservice
After this, using LOCATION URL provided above when I try to get the LG Smart TV description to know device info, services & commands supported, I get a "404 - Not Found" error.
Here is my code for getting decription:
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://<IP>:<PORT>/udap/api/data?target=rootservice.xml"]
cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData
timeoutInterval:10];
[request setHTTPMethod: @"GET"];
NSError *requestError;
NSURLResponse *urlResponse = nil;
NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&urlResponse error:&requestError];*
Why am I getting "404 - Not Found" error when I am trying to access a URL returned by UDAP service?
Thanks in advance