• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

creating REST webservices in java and consume them in android

 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • 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
 
Tim Moores
Bartender
Posts: 2895
46
  • Mark post as helpful
  • send pies
  • 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
  • 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???
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
i found them..
 
Tim Moores
Bartender
Posts: 2895
46
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
Bartender
Posts: 2895
46
  • Mark post as helpful
  • send pies
  • 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
  • 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
Bartender
Posts: 2895
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would the syntax be different?
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic