PDA

View Full Version : Problem calling Java Web Service



asmitakulkarni
10-12-2011, 07:56 AM
I have written a Java Web Service & called it from android activity.
The stuff works well with emulator but throwing exception when used with android phone.
Can Anybody Guide?

roderickbarnes
10-12-2011, 04:43 PM
Dude,

Please allow me to serve you in this matter. I have been working with Java-based web services and Android and documenting what I am doing in my blog. It will probably save you a ton of time. I hope it helps and that you are able to create some great solutions.

roderickbarnes.com/blog/?cat=123


In His grip by His grace,
Roderick L. Barnes, Sr.

asmitakulkarni
10-14-2011, 08:34 AM
Thanks.
I have seen your blog & the example there helped me a lot.

My Problem is like this -

I am calling a web service from my android app.
I am trying on localhost.
URL="http://10.0.2.2:8080/TstWebService/services/Hello;
The application calls the service & gives the expected results when used with emulator.
When I try the same thing with mobile device it is giving exception
10-14 18:25:12.740: DEBUG/SntpClient(59): request time failed: java.net.SocketException: Address family not supported by protocol
Can You pl. guide