• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Web service url not accessible from real device

 
Ranch Hand
Posts: 250
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,

My Jersey web service url is working fine when I am accessing it from pc's or emulator's browser. But it is not getting accessed from real Android device browser.
This is the url-

http://192.168.0.107:8080/KommaaropmetjeaanbiedingWebServices/jaxrs/services

Please tell me what can be the reason? What I have to do to access it from actual device?
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you sure the device has a valid network connectivity? What exact error/exception are you getting?
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Astha Sharma wrote:Hi,

My Jersey web service url is working fine when I am accessing it from pc's or emulator's browser. But it is not getting accessed from real Android device browser.
This is the url-

http://192.168.0.107:8080/KommaaropmetjeaanbiedingWebServices/jaxrs/services

Please tell me what can be the reason? What I have to do to access it from actual device?


That URL would only be accessible from inside your own network: the 192.168.0.107 is an IP address assigned by your local network's router. Your phone would only be able to connect to it if it is on WiFi and on the same network (the phone's IP address should also start with 192.168.0.nnn).

If the phone is on the telco data network, or you want the application accessible from the internet as a whole you will need to:
1) Find out your external IP address
2) Setup your firewall to forward port 8080 to the correct local IP
3) Use the external IP address for the connection.
 
Astha Sharma
Ranch Hand
Posts: 250
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Swastik Dey wrote:Are you sure the device has a valid network connectivity? What exact error/exception are you getting?


Thanks for the reply Swastik. The error it shows is web page is not available when I access it from phone.

Steve Luke wrote:That URL would only be accessible from inside your own network: the 192.168.0.107 is an IP address assigned by your local network's router. Your phone would only be able to connect to it if it is on WiFi and on the same network (the phone's IP address should also start with 192.168.0.nnn). If the phone is on the telco data network, or you want the application accessible from the internet as a whole you will need to:
1) Find out your external IP address
2) Setup your firewall to forward port 8080 to the correct local IP
3) Use the external IP address for the connection.


Thanks for the reply Steve. I will try doing this.
reply
    Bookmark Topic Watch Topic
  • New Topic