RESTful Web Service with Java JAX-RS. Create & Deploy to AWS
- 9.5 hours on-demand video
- 5 articles
- Full lifetime access
- Access on mobile and TV
- Certificate of Completion
Get your team access to 4,000+ top Udemy courses anytime, anywhere.Try Udemy for Business
- Install Java, Netbeans IDE, Postman, MySQL Service and Apache Tomcat on local Mac computer
- Learn to send HTTP Requests with Postman client
- Use Netbeans to write Java code
- Create Java Project with Maven
- Configure Hibernate framework to persist Java objects in MySQL database
- Build RESTful Java Web Services with JAX-RS and Jersey framework
- Startup AWS EC2 Linux Server in Amazon Cloud
- Configure AWS EC2 Instance Firewall
- Connect to AWS EC2 Instance via SSH
- Create MySQL database and users
- Install MySQL Server and Apache Tomcat on AWS EC2 Linux Server
- Deploy RESTful Java Web Service to a remote AWS EC2 Linux Server
- Implement Email Verification with AWS SES(Simple Email Service)
In this video we will download and install Postman client which we will use in this course to send HTTP Requests to our RESTful WebService.
When building RESTful WebServices it is very important to understand what is a Resource and what is a Resource collection as well as how to structure a URL to a Resource and to a Resource collection. In this video we will learn how the URL to a Resource should be structured and look like.
In this lesson I will give you an overview of how I have organized my code in this project. There are three main layers I am going to introduce you to: Presentation layer, Service layer and Data layer and you will learn what objects live in each of these layers.
In this video we are going to create a Web Service Resource Class which will be responsible for accepting HTTP Requests and responding to those HTTP Requests and this Resource class service HTTP requests that are only related to working with User and their Profile. For example to create a new user in our application we will send an HTTP Post request, and it is this Resource class, that will be responsible for handling that HTTP request and responding to it. Or if our mobile application needs to update or delete user profile, it is also this Resource class that will be service these http requests.
This resource class will need to be annotated with @Path annotation which will be used to specify the URI path to this resource class. For example by annotating this resource class with @Path("/users") we are making it available for http requests which are sent to a /api/users web service endpoint.
In this video we are going to create two Plain Old Java Objects which will be used when the framework needs to convert the JSON Payload into Java object when HTTP Request arrives and then back from Java to JSON or XML when we need to send the HTTP Response back.
And this conversion of JSON to Java and from Java back to JSON is done by the Jersey framework for us and we do not need to do anything manually other than create a Java class that will match the fields in the JSON object.
Also, I am going to use the Java Architecture for XML Binding (JAXB) approach and will annotate my Java Model classes with @XmlRootElement. The use JAXB will allow me to support both XML and JSON as a MediaType of the Resource Representation my Web Service sends back to a mobile application.
- You should have beginner knowledge of Java language
This is a very practical video course aimed at beginner Java developers to help them build their very first RESTful Java Web Service with JAX-RS and Jersey framework as well as implement features like:
- User sign up,
- User sign in,
- Token base authentication.
Students will also learn how to encrypt user provided password, generate a public user id which is safe to pass around the network in HTTP Requests, and how to generate and securely store as well as validate a secure access token,
- Protect RESTful WebService endpoints,
- Update database records by implementing Update User Profile details feature,
- and learn how to Delete database records,
- Implement Email Verification feature using Amazon AWS SES(Simple Email Service)
Students will learn how to use Postman HTTP client software to send: HTTP POST, GET, DELETE and PUT requests, as well as how to set needed HTTP Headers. We will also cover how to:
- Send data to your RESTful WebService via HTTP Body and
- How to pass data via URL Query String and as a Path parameter
You will also learn how to make your RESTful Web Service accept and respond back with JSON or XML media type.
This video course also teaches how to install needed software on local computer to be able to build RESTful Java Web Service as well as:
- How to start up your own Linux server in Amazon cloud( AWS EC2),
- Install needed software on a remote EC2 instance and finally,
- How deploy created WebService on AWS EC2 instance.
Please note that even though this video course covers all of the above mentioned, it is not a comprehensive guide that covers, in little details, all and everything about building Web Services. There are still things to be learned. But you will definitely benefit and gain by learning the above mentioned material.
- Beginner in Java programming
- Beginner in building RESTful Web Services