Forums Register Login

Consuming WebServices in Android

+Pie Number of slices to send: Send
A few questions..

1. How to consume a web service in Android? Any pointers or link to simple tutorials would be useful.
2. Since there are performance issues associated with web services - what special care needs to be taken when using them in Android applications?


Thanks.





+Pie Number of slices to send: Send
 

1. How to consume a web service in Android? Any pointers or link to simple tutorials would be useful.


At the easiest, web services can be called using the HttpURLConnection class. If that's available (check the Java API implemented by Android), then you can call web services.

2. Since there are performance issues associated with web services - what special care needs to be taken when using them in Android applications?[/qupte]
What kind of performance issues are talking about? How would those affect the client?

 
+Pie Number of slices to send: Send
Thanks for replying UD

Android APIs does have HttpURLConnection class but I am having problem using it because of proxy and firewall settings.

By performance I meant speed; are there ways to improve the response times?

Thanks.
+Pie Number of slices to send: Send
 

By performance I meant speed; are there ways to improve the response times?



Nothing particular to Android. Obviously, there are many many ways of improving performance of Web services and their consumption, but those are mostly Web service-related issues (e.g., using If-Modified-Since).

You might also consider using the Apache HttpClient API, available in Android. I tend to use that instead of URLConnection.
+Pie Number of slices to send: Send
HttpClient on Android
I just happened to come across this today. It is a pretty good introduction to using the Apache HttpClient on Android.
Do not set lab on fire. Or this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 14073 times.
Similar Threads
How to implement ksoap webservices in Android Emulator?
Reg: SOAP communication
Build Web Service layer on top of existing JSF & EJB web application
connecting to a web service
advantages of multiple endpoints but same shared service
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 03:47:45.