- Notifications
You must be signed in to change notification settings - Fork4.1k
Closed
Description
I'm trying to consume a SOAP service with the version 1.4.9 but I have an error and with the version 1.4.7 works fine.
W/System.err: java.net.UnknownHostException: Unable to resolve host "static-xxx-xxx-61-116.une.net.co": No address associated with hostnameW/System.err: at java.net.InetAddress.lookupHostByName(InetAddress.java:427)W/System.err: at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)W/System.err: at java.net.InetAddress.getByName(InetAddress.java:305)W/System.err: at cz.msebera.android.httpclient.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:154)W/System.err: at cz.msebera.android.httpclient.conn.scheme.SchemeSocketFactoryAdaptor.connectSocket(SchemeSocketFactoryAdaptor.java:65)W/System.err: at cz.msebera.android.httpclient.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)W/System.err: at cz.msebera.android.httpclient.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:145)W/System.err: at cz.msebera.android.httpclient.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:131)W/System.err: at cz.msebera.android.httpclient.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)W/System.err: at cz.msebera.android.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)W/System.err: at cz.msebera.android.httpclient.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:860)W/System.err: at cz.msebera.android.httpclient.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)W/System.err: at com.loopj.android.http.AsyncHttpRequest.makeRequest(AsyncHttpRequest.java:146)W/System.err: at com.loopj.android.http.AsyncHttpRequest.makeRequestWithRetries(AsyncHttpRequest.java:177)W/System.err: at com.loopj.android.http.AsyncHttpRequest.run(AsyncHttpRequest.java:106)W/System.err: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)W/System.err: at java.lang.Thread.run(Thread.java:818)The error happens when the url has a port associated, with not using the port works well.
example:
This works:
http://xxx.xxx.195.171/wsgenesis/wsgenesis.asmxThis does not work:
http://xxx.xxx.61.116:8087/wsgenesis/wsgenesis.asmxThis is my code:
client = new AsyncHttpClient(); client.setTimeout(20000); String soapAction = "http://navacom.com.co/Login"; client.addHeader("Content-Type", "text/xml; charset=utf-8"); client.addHeader("SOAPAction", soapAction); String contentType = "text/xml; charset=utf-8"; StringEntity entity = null; try { entity = new StringEntity(body, "utf-8"); entity.setContentType("text/xml; charset=utf-8"); entity.setChunked(true); } catch (IllegalArgumentException e) { Log.d("Depuracion", "StringEntity: IllegalArgumentException " + e); } String serverUrl = url + "?op=Login"; client.post(mContext, serverUrl, entity, contentType, new AsyncHttpResponseHandler() { .... .... });