android wifi comm issue with WS deployed in VM
Posted: 17. Feb 2016, 21:56
Hi,
I am trying to call a java web service, successfully deployed in glassfish-4.1.1 in Virtualbox VM, from an app on an Android phone (HTC One). Basing my code off of http://programmerguru.com/android-tutor ... in-android, however, I am using a VM. I am trying to communicate from an app on the Android phone, to the web service deployed in the VM, via wireless router.
The issue I have is I need to know the web service URL, to put in my Android code.
From the code in the tutorial mentioned above, is this line:
private static String URL = http://192.168.1.100:8080/HelloWorldWeb ... rvice?WSDL
My question is: what URL do I use, for the line above, to capture the web service deployed in the VM? In the glassfish server logs, it says:
“listening at address http://localhost.localdomain:8080”
When I look at /etc/hosts, localhost.localdomain is 127.0.0.1. I tried 127.0.0.1 for the String URL above, but am not able to talk to the web service deployed in glassfish, in the VM, from the android phone yet. I do note that when I run “ping 127.0.0.1” from a terminal emulator on the Android phone, it comes back successful. Is there something inherently wrong that I’m doing? TIA for any advice.
I am trying to call a java web service, successfully deployed in glassfish-4.1.1 in Virtualbox VM, from an app on an Android phone (HTC One). Basing my code off of http://programmerguru.com/android-tutor ... in-android, however, I am using a VM. I am trying to communicate from an app on the Android phone, to the web service deployed in the VM, via wireless router.
The issue I have is I need to know the web service URL, to put in my Android code.
From the code in the tutorial mentioned above, is this line:
private static String URL = http://192.168.1.100:8080/HelloWorldWeb ... rvice?WSDL
My question is: what URL do I use, for the line above, to capture the web service deployed in the VM? In the glassfish server logs, it says:
“listening at address http://localhost.localdomain:8080”
When I look at /etc/hosts, localhost.localdomain is 127.0.0.1. I tried 127.0.0.1 for the String URL above, but am not able to talk to the web service deployed in glassfish, in the VM, from the android phone yet. I do note that when I run “ping 127.0.0.1” from a terminal emulator on the Android phone, it comes back successful. Is there something inherently wrong that I’m doing? TIA for any advice.