Register   Login   About   Study   Enterprise   Share
Internet / AI Technology University (ITU/AITU)
Fast Login - available after registration







|

Top Links: >> 80. Technology >> Internet Technology Summit Program >> 4. Web Apps Frameworks >> 4.5. Web Services
Current Topic: 4.5.1. REST Web Services
You have a privilege to create a quiz (QnA) related to this subject and obtain creativity score...
Representational State Transfer (REST) is an architectural style that focuses on web resources accessed with Uniform Resource Identifiers (URIs).

The REST uses a stateless HTTP, using four HTTP methods to create, read, update, delete operations: PUT, GET, POST, and DELETE. The simplest example would be an HTTP request with the GET method, which looks like a regular URL or a link:

http://itofthefuture.com/BASE/Lookup

This URL points to so called Endpoint, where a resource is located. JAX-RS API supports RESTful services with a set of annotations.
The @Path annotation points to the Endpoint URI to which the resource responds. A value of the @Path annotation can include a template denoted by braces:

@Path("/BASE/Lookup/{action}")

A JAX-RS web service will respond to the requests. For example:
http://itofthefuture.com/BASE/Lookup/getContent

The @PathParam annotation may be used on the method parameter To obtain the value of the action, of a request method, as shown in the following code example:

@Path("/BASE/Lookup/{action}")
public class WebResourceAction {

@GET
@Produces("text/html")
public String getResponse(@PathParam("action") String action) {
// using Data Service library
HtmlResponseAction responseAction = (HtmlResponseAction) Class.forName(action).newInstance();
String html = responseAction.run(); // a specific action will run and in response provide an html
return html;
}
}


This URL or a link provides an HTTP request with the GET method. The response is usually formatted as an HTML page visible in a browser. But the content can be accessed in a many formats including HTML, XML, plain text, PDF, JPEG, JSON, and more.
Was it clear so far?


Metadata about the resource is available and used, for example, to control caching, detect transmission errors, negotiate the appropriate representation format, and perform authentication or access control.

Every HTTP interaction is stateless; request messages are self-contained. Stateful interactions are based on the concept of explicit state transfer. Several techniques exist to provide stateful interaction, which means to transfer the state:
- URI rewriting,
- cookies, and
- Hidden form fields.
- State can be embedded in response messages to point to valid future states of the interaction

Assignments:
1. Create the Maven Web project 4.5.WebServices-WS.
2. Write Business Requirements and Design Spec MS Word document and place to the resources - directory.
3. Business Requirements and Design Spec should allow to demonstrate the following skills:
- Working with DB via DataService
- Providing WSDL-based services via JAX-WS
- Using Angular for front page operations
- Using Bootstrap to provide visibility on a mobile phone
4. Create the Maven Web project 4.5.WebServices-RS.
5. Write Business Requirements and Design Spec MS Word document and place to the resources - directory.
6. Business Requirements and Design Spec should allow to demonstrate the following skills:
- Working with DB via DataService
- Providing REST-based services via JAX-RS
- Using Angular for front page operations
- Using Bootstrap to provide visibility on a mobile phone
7. Email the sources for both projects as zip files to dean@ituniversity.us
8. Create high quality 4 QnAs and email to dean@ituniversity.us
9. Enhance the last project done with DataService to allow both WS and Rest services to access major functions, which otherwise available to client via the web page GUI interface.
10. Email enhanced project sources as zip with good description of WS and REST API to dean@ituniversity.us


| Check Your Progress | Propose QnA | Have a question or comments for open discussion?
<br/>@Path("/BASE/Lookup/{action}")
<br/>public class WebResourceAction {
<br/>
<br/>    @GET
<br/>    @Produces("text/html")
<br/>    public String getResponse(@PathParam("action") String action) {
<br/>        // using Data Service library
<br/>        HtmlResponseAction responseAction = (HtmlResponseAction) Class.forName(action).newInstance();
<br/>        String html = responseAction.run(); // a specific action will run and in response provide an html
<br/>        return html;
<br/>    }
<br/>}
<br/>


This URL or a link provides an HTTP request with the GET method. The response is usually formatted as an HTML page visible in a browser. But the content can be accessed in a many formats including HTML, XML, plain text, PDF, JPEG, JSON, and more.





Was it clear so far?



Metadata about the resource is available and used, for example, to control caching, detect transmission errors, negotiate the appropriate representation format, and perform authentication or access control.

Every HTTP interaction is stateless; request messages are self-contained. Stateful interactions are based on the concept of explicit state transfer. Several techniques exist to provide stateful interaction, which means to transfer the state:
- URI rewriting,
- cookies, and
- Hidden form fields.
- State can be embedded in response messages to point to valid future states of the interaction

Assignments:
1. Create the Maven Web project 4.5.WebServices-WS.
2. Write Business Requirements and Design Spec MS Word document and place to the resources - directory.
3. Business Requirements and Design Spec should allow to demonstrate the following skills:
- Working with DB via DataService
- Providing WSDL-based services via JAX-WS
- Using Angular for front page operations
- Using Bootstrap to provide visibility on a mobile phone
4. Create the Maven Web project 4.5.WebServices-RS.
5. Write Business Requirements and Design Spec MS Word document and place to the resources - directory.
6. Business Requirements and Design Spec should allow to demonstrate the following skills:
- Working with DB via DataService
- Providing REST-based services via JAX-RS
- Using Angular for front page operations
- Using Bootstrap to provide visibility on a mobile phone
7. Email the sources for both projects as zip files to dean@ituniversity.us
8. Create high quality 4 QnAs and email to dean@ituniversity.us
9. Enhance the last project done with DataService to allow both WS and Rest services to access major functions, which otherwise available to client via the web page GUI interface.
10. Email enhanced project sources as zip with good description of WS and REST API to dean@ituniversity.us



| Check Your Progress | Propose QnA | Have a question or comments for open discussion?

Have a suggestion? - shoot an email
Looking for something special? - Talk to me
Read: IT of the future: AI and Semantic Cloud Architecture | Fixing Education
Do you want to move from theory to practice and become a magician? Learn and work with us at Internet Technology University (ITU) - JavaSchool.com.

Technology that we offer and How this works: English | Spanish | Russian | French

Internet Technology University | JavaSchool.com | Copyrights © Since 1997 | All Rights Reserved
Patents: US10956676, US7032006, US7774751, US7966093, US8051026, US8863234
Including conversational semantic decision support systems (CSDS) and bringing us closer to The message from 2040
Privacy Policy