Web Services Flashcards

1
Q

What is a web service

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does stateless and state ful mean

A

Stateless doesn’t retain information of previous requests

Only uses info from current request

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is REST

A

Architectural style for developing applications that can be accessed across the network
It’s stateless client server architecture where resources are identified by URIs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Advantages and disadvantages of REST

A
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is JAX -RS API ?

A

Java api for creating restful web services

It is part of JDK

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Annotations in JAX-RS

A

@Path , @get @pathparam

How well did you know this?
1
Not at all
2
3
4
5
Perfectly