• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Favorite libs for SOAP & REST Clients

 
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

Thanks
Siegfried
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic