Thank you for your reply richard.

I was thinking that because the emulator and the application server
are working on different ports i could use the localhost in the
emulator in order to call the web service.

So, the only way of calling a localhost web service from the emulator
is by using the actual network IP address?

But my IP address changes every time. That means i have to change my
program every time? Is there another way?


On Jul 9, 7:17 pm, RichardC <richard.crit...@googlemail.com> wrote:
> 127.0.0.1 is the loopback (local address) for the emulator.
>
> 127.0.0.1 is the local system; so when you are on the emulator it is
> the emulator, when you are on your host it is the host.
>
> 127.0.0.1 can never cross a system boundary (for a given value of
> never).
>
> /Richard
>
> On Jul 9, 1:04 pm, NIK <nikolaos.katsa...@gmail.com> wrote:
>
> > Hi all.
>
> > I faced a weird problem the last days.
>
> > I had to call a restful web service from the emulator. The web service
> > was deployed on the localhost application server and when i tried to
> > access it via the browser everything was fine.
>
> > When i tried to access is from the emulator with the following IP
> > (127.0.0.1/) it did not work. Then i changed the IP to my actual
> > network's IP and it worked.
>
> > Does anybody know why this is happening?
>
> > Thanks.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to