Skip to content Skip to sidebar Skip to footer

Android Webservice Access Error

I have a simple java web service deployed on Tomcat7 server. I have used Axis2 as soap engine.(Web service & WSDL is OK) Here is the code I have used for the web service publ

Solution 1:

In Honeycomb and Ice Cream Sandwich (i.e. Android 3.0+) , you cannot connect to the internet in the main thread (onCreate(), onPause(), onResume() etc.), and you have to instead start a new thread. The reason why this has changed is because network operations can make the app wait for a long time, and if you're running them in the main thread, the whole application becomes unresponsive. If you try to connect from the main thread, Android will throw a NetworkOnMainThreadException.

Solution 2:

In latest android version, it is not possible make web service call from UI thread.There is a similar thread related to this.

Android kSOAP web service problem

May be this will help you.

Post a Comment for "Android Webservice Access Error"