I am having a web server running glass fish 4 on port 8080 in my local. I am also having a standalone java socket server running in local on port 9010.
When I try to access a webservice from Objective C on my glass fish server using NSURLConnection on port 8080, the socket also gets called even though it runs on a different port. NSURL connection code is provided below,
NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:”http://localhost:8080/testapp/customer/authenticate”]];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
[request setHTTPMethod:@“post”];
[request setHTTPBody:myjsonRequestData];
[NSURLConnection connectionWithRequest:request delegate:self];
I have searched but could not find any leads. Please help