• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Favorite libs for SOAP & REST Clients  RSS feed

Ranch Hand
Posts: 420
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a WCFRIA C# SOAP server and a Java Spring REST/JSON server that I want to access from my first android app.
I need to implement forms based authentication: I need to authenticate a username and password and receive a session ID for subsequent calls.

I see there are several prospective libraries for building clients.
What are your favorites? Jersey Client? Apache HTTPClient?

While I was looking in maven I saw some client libraries with "android" in them. Do I need to use one of these? Will these run in a desktop app outside the emulator.

Can I expect to write a prototype desktop SWING client in eclipse to test my code and then cut and paste this java SOAP client code (and REST client code) into an android app and have that android app work?

Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many times Java libs won't work in Android due to missing dependencies and vice versa. You're better off getting an Android specific library and coding directly in the Android environment. Try http://loopj.com/android-async-http/ It solves some Android specific problems which you would have to re-solve if you did manage to get a straight Java library working.
Posts: 42974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For SOAP I think pretty much the only game in town in ksoap2-android, but few people use SOAP on a mobile device.

For REST, I generally use the built-in Apache HTTPClient library in an AsyncTask, although the library Steve mentions looks interesting for some of the extra features it has. Haven't needed those so far, though.
Montana has cold dark nights. Perfect for the heat from incandescent light. Tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!