Is there any thing we have to change in the code when we shift the API levels?
<p>I have connected to the web service and retrieved the values in android device, version 2.2, API 8. But when I changed the version to 3.0 and the emulator to API 11. the same code is showing error. I have changed the manifest file sdk versions and all.</p>

<p>The problem is as follows:</p>

<pre><code>HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
// androidHttpTransport.debug=true;
try{
    androidHttpTransport.call(SOAP_ACTION, envelope);
    // after this line it is going to the catch block
    SoapObject resultString=(SoapObject)envelope.bodyIn;

    // the result string is null when I used debugger and checked
    System.out.println("the result string displayed :" +resultString);
    String result=resultString.getProperty(0).toString();
} catch (Exception e) {
    e.getMessage();
}
</code></pre>

<p><strong>The Logcat Error is as follow:</strong></p>

<pre><code>WARN/System.err(886): android.os.NetworkOnMainThreadException
 WARN/System.err(886):     at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1077)
 WARN/System.err(886):     at dalvik.system.BlockGuard$WrappedNetworkSystem.connect(BlockGuard.java:368)
 WARN/System.err(886):     at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:208)
 WARN/System.err(886):     at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:431)
 WARN/System.err(886):     at java.net.Socket.connect(Socket.java:901)
 WARN/System.err(886):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.&lt;init&gt;(HttpConnection.java:75)
WARN/System.err(886):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.&lt;init&gt;(HttpConnection.java:48)
WARN/System.err(886):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection$Address.connect(HttpConnection.java:304)
WARN/System.err(886):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:89)
WARN/System.err(886):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHttpConnection(HttpURLConnectionImpl.java:292)
WARN/System.err(886):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.makeConnection(HttpURLConnectionImpl.java:274)
WARN/System.err(886):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:217)
WARN/System.err(886):     at org.ksoap2.transport.ServiceConnectionSE.connect(ServiceConnectionSE.java:75)
WARN/System.err(886):     at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:136)
WARN/System.err(886):     at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:90)
WARN/System.err(886):     at com.timetracker.app.Index.run(Index.java:214)
WARN/System.err(886):     at com.timetracker.app.Index$1.onClick(Index.java:77)
WARN/System.err(886):     at android.view.View.performClick(View.java:3100)
WARN/System.err(886):     at android.view.View$PerformClick.run(View.java:11644)
WARN/System.err(886):     at android.os.Handler.handleCallback(Handler.java:587)
WARN/System.err(886):     at android.os.Handler.dispatchMessage(Handler.java:92)
WARN/System.err(886):     at android.os.Looper.loop(Looper.java:126)
WARN/System.err(886):     at android.app.ActivityThread.main(ActivityThread.java:3997)
WARN/System.err(886):     at java.lang.reflect.Method.invokeNative(Native Method)
WARN/System.err(886):     at java.lang.reflect.Method.invoke(Method.java:491)
WARN/System.err(886):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
WARN/System.err(886):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
WARN/System.err(886):     at dalvik.system.NativeStart.main(Native Method)
</code></pre>
