• 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

creating REST webservices in java and consume them in android

 
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i want to get started with creating Rest webservices in java and consume those services in android.....
any help to get started would be great help for me..
iam a newbie for webservices any beginners guide of the same???

thankyou
 
Saloon Keeper
Posts: 7582
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out the Jersey library. Its web site has a bunch of documentation. On the Android side you can use the built-in HttpClient library to consume those services. I'm sure if you search for "android httpclient jax-rs example/tutorial" or some such phrase you'll find multiple introductory articles as well.
 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thankyou Tim...
that was really helpfull
i m following this link
http://www.ibm.com/developerworks/library/x-android-jax-rs/

iam finding difficulty in finding these jars
jersey-bundle-1.4.jar
C:\Jersey\jersey-archive-1.4\lib\asm-3.1.jar
C:\Jersey\jersey-archive-1.4\lib\jsr311-api-1.1.1.jar

where i can i get them???
 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is exactly what Google and Maven repositories can do for you.
 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i found them..
 
Tim Moores
Saloon Keeper
Posts: 7582
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You shouldn't use Jersey 1.4, but the latest version - 1.12 at the moment, I believe.
 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yup thank you;
i have used jersey 1.12.

now i have successfully tried an example to connect android with rest webservices....
 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how could i pass data from android to remote database through webservices using JAX-RS...
FOUND no good example so far
 
Tim Moores
Saloon Keeper
Posts: 7582
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JAX-RS class would access the DB like any other Java class would; what, excatly, are you looking for in the example? Or, to put it another way: what are struggling with? Are you familiar with JDBC?
 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes iam comfortable with jdbc...
can i connect it lyk i do with my nbormal java class???
arent the syntaxes different???
 
Tim Moores
Saloon Keeper
Posts: 7582
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why would the syntax be different?
 
Hussein Baghdadi
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Suzzane Pinto wrote:yes iam comfortable with jdbc...
can i connect it lyk i do with my nbormal java class???
arent the syntaxes different???


Suzzane kindly use real words.
 
reply
    Bookmark Topic Watch Topic
  • New Topic