Win a copy of Event Streams in Action this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Running local webservice on android device connected using USB cable

 
Greenhorn
Posts: 27
Eclipse IDE Oracle Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have developed an application in android using ksoap2 which used local .NET webservice and it works perfectly fine on the Emulator but when i connected the device the application starts on he device but the web service call does not work

I think i need to change the URL for the webservice.Given below is the current URL which i am using and it works on emulator but doesnt work on android device.

String NAMESPACE = "http://tempuri.org/";
String URL = "http://10.0.2.2:12736/InventoryWebService.asmx";



I google and tried many options but no help , so can anyone have any idea regarding the same then please do reply.

 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Who assigns the physical IP?

If over WI-FI then usually the router.

If over 3/4G cellular then you are at the mercy of the carrier.

WP
 
Pawan Choure
Greenhorn
Posts: 27
Eclipse IDE Oracle Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't get what you said about the physical IP, i have connected my andriod device with my pc using USB cable....
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
10.0.1.2 is the IP for accessing the desktop machine to which the device is connected.
 
Pawan Choure
Greenhorn
Posts: 27
Eclipse IDE Oracle Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for youe reply Ulf, Will surely try that, I just wanted to confirm , what will be the port number in that case or there is no need to provide port number in the URL.
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The port number is whatever port you want to connect to.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!