File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

android.os.networkonmainthreadexception

 
Satchidananda Mohanty
Ranch Hand
Posts: 78
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a jax-ws webservice which I want to call from my android application. The code is mentioned below.



AndroidMainfest File :



I have included ksoap2-android-full-2.1.2.jar too.



But while running this code it shows "android.os.networkonmainthreadexception"

Kindly provide your precious solution to overcome this.

Thanking you.
 
Satchidananda Mohanty
Ranch Hand
Posts: 78
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Please find the webservice code details which works fine from normal java web application.





Thanks ,
 
Tim Moores
Bartender
Pie
Posts: 2488
4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the full stack trace. In which line of code does it occur?
 
Satchidananda Mohanty
Ranch Hand
Posts: 78
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

This issue has been resolved by adding this code in the onCreate method.



Thanks,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic