Web Services Flashcards
What is a web service
Works on client server model
Client apps can access web services over the network
Web services provide endpoint URL’s and expose methods
They are stateless and don’t maintain user session
What does stateless and state ful mean
Stateless doesn’t retain information of previous requests
Only uses info from current request
What is REST
Architectural style for developing applications that can be accessed across the network
It’s stateless client server architecture where resources are identified by URIs
Advantages and disadvantages of REST
Advantages Lightweight Tested on browser Learning curve is less Support multiple techs for data transfer such as text, xml or Json
Disadvantages
No contract defined so need to find a different way to communicate
Since it’s on HTTP there can’t be asynchronous calls. This means that once request is issued you wait for a response
Sessions can’t be maintained
What is JAX -RS API ?
Java api for creating restful web services
It is part of JDK
Annotations in JAX-RS
@Path , @get @pathparam