views:

47

answers:

1

Im getting a IOExeption 'Host is unresolved' on HttpPost. The Endpoint in this case a a computer on my LAN with a webservice. (http://pc259:8080/test/service.asmx). Im using WIFI to my LAN. Does Android know to to resolved computernames?

StringEntity se = new StringEntity(xmlDataToSend);
se.setContentType("text/xml");
HttpPost httppost = new HttpPost(endPoint);     
httppost.setHeader("Content-Type","application/soap+xml");
httppost.setEntity(se);         
HttpClient httpclient = new DefaultHttpClient();
Log.i(TAG, " - Before execute");
httpResponse = (BasicHttpResponse) httpclient.execute(httppost);
A: 

Most likely pc259 is not defined in you DNS server, but is a NetBios hostname (see http://en.wikipedia.org/wiki/NetBIOS#NetBIOS_name_vs_host_name).
I don't think Android can resolve these kind of hostnames - you'll need to add this computer to the DNS repository.

adamk