• Post Reply Bookmark Topic Watch Topic
  • New Topic

Running local webservice on android device connected using USB cable

 
Pawan Choure
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.

 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 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....
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • 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: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The port number is whatever port you want to connect to.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!