views:

134

answers:

1

I have an http request that worked as http://blah.com and now I have been asked to use https://blah.com

The former works and the later fails with a Network I/O error. Are there any missing parameter settings that I need for the client?

The URL request:

D/MyAppWebservice(23142): http-transform :) [https://cdp.mobibob.com:8151/DoTransaction]

Following is the log:

E/MyAppContentProvider(23142): com.mobibob.myapp.MyAppExceptions$ParseException: Network or I/O error calling web service.
W/System.err(23142): com.mobibob.myapp.MyAppExceptions$ParseException: Network or I/O error calling web service.
W/System.err(23142):    at com.mobibob.myapp.MyAppWebservice.queryApi(MyAppWebservice.java:558)
W/System.err(23142):    at com.mobibob.myapp.MyAppContentProvider.queryWebservice(MyAppContentProvider.java:751)
W/System.err(23142):    at com.mobibob.myapp.MyAppContentProvider.query(MyAppContentProvider.java:440)
W/System.err(23142):    at android.content.ContentProvider$Transport.query(ContentProvider.java:130)
W/System.err(23142):    at android.content.ContentResolver.query(ContentResolver.java:202)
W/System.err(23142):    at com.mobibob.myapp.ui.DownloadActivity.goGenDownloadTransaction(DownloadActivity.java:168)
W/System.err(23142):    at com.mobibob.myapp.ui.DownloadActivity$DownloadTransaction.doInBackground(DownloadActivity.java:90)
W/System.err(23142):    at com.mobibob.myapp.ui.DownloadActivity$DownloadTransaction.doInBackground(DownloadActivity.java:1)
W/System.err(23142):    at android.os.AsyncTask$2.call(AsyncTask.java:185)
W/System.err(23142):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
W/System.err(23142):    at java.util.concurrent.FutureTask.run(FutureTask.java:137)
W/System.err(23142):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
W/System.err(23142):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
W/System.err(23142):    at java.lang.Thread.run(Thread.java:1096)
W/System.err(23142): Caused by: java.io.IOException: SSL handshake failure: I/O error during system call, Unknown error: 0
W/System.err(23142):    at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.nativeconnect(Native Method)
W/System.err(23142):    at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:305)
W/System.err(23142):    at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:92)
W/System.err(23142):    at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:321)
W/System.err(23142):    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:129)
W/System.err(23142):    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
W/System.err(23142):    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
W/System.err(23142):    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
W/System.err(23142):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
W/System.err(23142):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
W/System.err(23142):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
W/System.err(23142):    at com.mobibob.myapp.MyAppWebservice.queryApi(MyAppWebservice.java:510)
W/System.err(23142):    ... 13 more
+1  A: 

Https almost always implies a different port being used (standard http=>80; standard https=>443). You have a hardcoded port (8151). I'm guessing the https servlet is listening on a different port.

Or you're trying to connect to a server that doesn't support https.

Visser
I will check the port tomorrow. It is possible that the server has not switched over support for this service as it was just recently discussed as a requirement. I was instructed to switch ASAP -- but maybe that was too S :)
mobibob
@Visser it was the port ... I had some other problems including the Content-Type, but that changed from Network I/O to 200 OK with an application response. I am awarding you the answer. Thanks!
mobibob
BTW - my website accepts a 'default' port for https, so removing the :8150 also worked. In any event, the hard-coded port to the non-HTTPS port was the problem.
mobibob