This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Help to learn REST web services

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am trying to learn REST web services. But it seems to use annotations every where. Is there any implementation of Rest framework without using annotations
 
Bartender
Posts: 1175
38
IBM DB2 Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may try to use Spring. Don't sure if the same applies to REST stuff as well, but usually Spring lets you to use both annotations and xml config files to build your applications.

Personally I prefer by far java frameworks using annotations instead xml or other textual property files, bu that's a matter of taste.
 
Saloon Keeper
Posts: 5802
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Jersey site has many examples and introductory material. (Jersey is the reference implementation of the JAX-RS REST API.)

You should come to terms with using annotations; there really is no way around them with modern Java APIs. Why would you want to avoid them?
 
naga eswar
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply Claude Moore and Tim Moores ,

Actually, in our application till now we used SOAP webservice without annotations and learned exact flow.
Same flow I want to learn without annotations.

can some one please proivide website or any document to learn
 
Tim Moores
Saloon Keeper
Posts: 5802
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There isn't much of a flow to learn, as REST WS are conceptually and implementation-wise much simpler than SOAP WS. Take the advice and learn to use JAX-RS via its annotations as it is meant to be used.
 
naga eswar
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Tim,

We have started working on rest. Below is the imports we are using.
In eclipse when I configure the coresponding jar files in Build path, Eclipse is not showing any errors.

import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

When we are building with Ant it is showing error "package javax.ws.rs does not exist".
Please can some one shade a light on it.

 
Tim Moores
Saloon Keeper
Posts: 5802
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sounds like the JAX-RS jar files have not been added properly to the classpath. If you run Ant with the "-verbose" switch it'll print out the classpath it uses for compilation. Make sure the JAX-RS API is included in that.
 
expectation is the root of all heartache - shakespeare. tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!