• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

android.os.networkonmainthreadexception

 
Ranch Hand
Posts: 78
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

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





Thanks ,
 
Saloon Keeper
Posts: 7072
165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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



Thanks,
 
I will suppress my every urge. But not this shameless plug:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic