Calling web services in android

by kavitha » Fri, 10 Apr 2009 19:29:58 GMT


Sponsored Links
 Hi All,

I am doing game project where in i need to call PHP web service and
display scores in score board.

I am new to android,Can somebody please help on how to call web
services in android.

I searched for so many examples,but no example looked to be working.

It is urgent,Please help.

Thanks
Kavitha
--~--~---------~--~----~------------~-------~--~----~



Calling web services in android

by kavitha » Fri, 10 Apr 2009 19:30:52 GMT


 Hi All,

I am doing game project where in i need to call PHP web service and
display scores in score board.

I am new to android,Can somebody please help on how to call web
services in android.

I searched for so many examples,but no example looked to be working.

It is urgent,Please help.

Thanks
Kavitha
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Calling web services in android

by kavitha » Fri, 10 Apr 2009 19:30:53 GMT


 Hi All,

I am doing game project where in i need to call PHP web service and
display scores in score board.

I am new to android,Can somebody please help on how to call web
services in android.

I searched for so many examples,but no example looked to be working.

It is urgent,Please help.

Thanks
Kavitha
--~--~---------~--~----~------------~-------~--~----~



Calling web services in android

by Charlie Collins » Fri, 10 Apr 2009 19:56:00 GMT


 It depends on what you mean by "web services," but there are many many
many threads on this list about that topic. Try searching the list,
you will find KSOAP examples (if you mean SOAP), and REST examples,
and several discussions about when and where you should use "web
services" with a mobile device.



--~--~---------~--~----~------------~-------~--~----~



Calling web services in android

by kavitha » Fri, 10 Apr 2009 20:26:12 GMT


 Hi Charlie,

I am trying to consume web service methods written in PHP which will
give me information about score board in my game.

I tried searching and execute examples,,but in vain.

When new user starts playing game,,i need to send information to web
service through post or get request to insert a new player details
record.

when user tries to see top 20 scores,i should be able to parse the xml
output from php server returned by web service and display them in
android.

For all these things,i need to make connection with PHP web service
and be able to call methods and get response.

sample response xml from server is
 http://www.permeative.com/projects/clearit/getall_global_scores.php 


How to do it in android?

Please help.

Thanks
Kavitha





On Fri, Apr 10, 2009 at 5:25 PM, Charlie Collins




--~--~---------~--~----~------------~-------~--~----~



Calling web services in android

by Mark Murphy » Fri, 10 Apr 2009 20:36:21 GMT


 


The same way you might do it in "regular" Java:

-- Use HttpURLConnection or HttpClient to retrieve the document

 http://www.exampledepot.com/egs/java.net/pkg.html 
 http://hc.apache.org 

-- Use DOM or SAX or the XmlPullParser to parse the document

 http://www.exampledepot.com/egs/javax.xml.parsers/pkg.html 

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android App Developer Training:  http://commonsware.com/training.html 

--~--~---------~--~----~------------~-------~--~----~



Calling web services in android

by Muthu Ramadoss » Fri, 10 Apr 2009 22:12:45 GMT


 Android has an http library that you can use to connect to your web service.

 http://developer.android.com/reference/org/apache/http/package-summary.html 

take care,
Muthu Ramadoss.

 http://linkedin.com/in/tellibitz 
 http://androidrocks.googlecode.com  - Android Consulting.

Vince Lombardi< http://www.brainyquote.com/quotes/authors/v/vince_lombardi.html> ;
- "Show me a good loser, and I'll show you a loser."





--~--~---------~--~----~------------~-------~--~----~



Calling web services in android

by Chander Pechetty » Fri, 10 Apr 2009 22:14:20 GMT


 Use the Apache HTTP api's that come with android SDK.
 http://developer.android.com/reference/org/apache/http/client/methods/package-summary.html 
You will find examples on how to use Apache http components here:
 http://hc.apache.org/ 


--~--~---------~--~----~------------~-------~--~----~



Calling web services in android

by neodante » Mon, 13 Apr 2009 12:13:50 GMT


 Here's a good starting point (using ksoap) :
 http://www.anddev.org/calling_a_web_service_from_android-t348.html 

Julien




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Native windowing system

Hello,
why android dont have a native windowing system?

Thanks in advance.

-- 

2. Sony LocationFree Compatible App

Hello!  I'm not a developer, but I come to plead on behalf of
thousands of people.  Sony has no plans to commission the development
of an Android client for their product.  In fact, there is no mobile
application available for any platform.  Ironically, mobile use was
one of the most anticipated benefits of the L.F. service.  Sony
suggested contacting third-party companies to express interest in such
an application.  However, in the short time that I have owned an
android phone, I have noticed that the most ingenious applications
seem to come from independent or small company developers.  And so, on
behalf of thousands of jilted Sony L.F. users everywhere,  I come to
say ... HELP!!!  If any of you feel inclined to take on such a
product, you would have the gratitude of a lot of people.  Thanks, in
advance, for anyone's efforts.

-- 

3. How to get the AID for application in android.

4. preventing a crashed service from restarting...

5. Standardizing and promoting open intents (latest android blog post)

6. Certificate problem with updating even though I still have the same keystore

7. contacts application dependency issues