aspose file tools*
The moose likes Android and the fly likes Consuming WebServices in Android Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Consuming WebServices in Android" Watch "Consuming WebServices in Android" New topic
Author

Consuming WebServices in Android

Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

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.






[List of FAQs] | [Android FAQ] | [Samuh Varta]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42913
    
  68
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?
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

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.
Mark L. Murphy
Author
Ranch Hand

Joined: Feb 11, 2009
Posts: 131
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.


Mark Murphy (a Commons Guy)
Author of The Busy Coder's Guide to Android Development http://commonsware.com/Android/
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

HttpClient on Android
I just happened to come across this today. It is a pretty good introduction to using the Apache HttpClient on Android.


The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Consuming WebServices in Android