title: How to connect android device to localhost server?
body: <p>I am trying to establish a connection between my client app running on my android mobile and a server running on my windows 7 PC.</p>
  
  <p>I am new to android and so while looking for some client server tutorial, got the below 2 links.</p>
  
  <p><a href="http://www.compiletimeerror.com/2013/09/creating-java-web-service-using-axis-2.html" rel="nofollow">http://www.compiletimeerror.com/2013/09/creating-java-web-service-using-axis-2.html</a></p>
  
  <p><a href="http://www.compiletimeerror.com/2013/09/accessing-web-service-from-android.html" rel="nofollow">http://www.compiletimeerror.com/2013/09/accessing-web-service-from-android.html</a></p>
  
  <p>Here, server is developed on java and published using axis2 webservice. I followed the tutorial and could develop the similar client and server which runs fine on the emulator. But if I try to access the same using my android mobile it is not working. My mobile is unable to speak to the localhost on my PC.</p>
  
  <p><strong>What I am doing here is,</strong></p>
  
  <pre><code>1. Connected both my PC and mobile to same WIFI network.
  2. Connected the mobile to PC using USB.
  3. Started the Server on Tomcat
  4. Running the Client Project from eclipse and selecting my mobile as target.
  </code></pre>
  
  <p>Below is my published webservice URL which I am calling from client code,</p>
  
  <pre><code>http://192.168.0.3:8080/MyWebService/services/WebService?wsdl
  </code></pre>
  
  <p>Here  <strong>192.168.0.3</strong> is my PC IP</p>
  
  <p>Please let me know what am I doing wrong here?</p>