service-oriented architecture with java

34
Introduction to JAVA AND SOA www.edureka.co/java-j2ee-soa-training

Upload: edureka

Post on 12-Aug-2015

342 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Service-Oriented Architecture With Java

Introduction to JAVA AND SOA

www.edureka.co/java-j2ee-soa-training

Page 2: Service-Oriented Architecture With Java

LIVE On-line Class

Class Recording in LMS

24/7 Post Class Support

Module Wise Quiz

Project Work on Large Data Base

Verifiable Certificate

www.edureka.co/java-j2ee-soa-trainingSlide 2 Twitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

How it Works?

Page 3: Service-Oriented Architecture With Java

www.edureka.co/java-j2ee-soa-trainingSlide 3 Twitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Objectives

At the end of this module, you will be able to

Understand Java and its advantages.

Learn about SOA with examples, job trends, uses and implementation.

Understand the basics of SOAP and RESTful services.

Page 4: Service-Oriented Architecture With Java

Slide 4 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Introduction to Java

Java is developed by James Gosling in Sun Microsystems.

This language was initially named as OAK and later renamed as Java.

Java is a computer programming language that is

concurrent

class-based

object-oriented

specifically designed to have as few implementation dependencies as possible.

Page 5: Service-Oriented Architecture With Java

Slide 5 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Features of Java

Java is:

Simple

Secure

Portable

Object oriented

Robust

Multi-threaded

Architecture neutral

High performance

Distributed

Page 6: Service-Oriented Architecture With Java

Slide 6 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Where Java is Used?

Java is used in various enterprise level application/frameworks all around the world.

Java is used:

in over 850 million PCs as Java Runtime Environment to develop Android Applications to develop Hadoop Applications to develop frameworks for:

» Hadoop» Spring» Hibernate» Struct

to develop Business Process Management (BPM) tools. to develop Web Servers, Application Servers, etc.

Page 7: Service-Oriented Architecture With Java

Slide 7 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Technologies of Java

Some of the Technologies of Java are:

JSP - Java Server Pages. This technology is used to display web pages.

Spring - This framework is used to write project/business logic. It is used widely inthe industry and it has all the technologies of Java which is supported right now.

JDBC - Java Database Connectivity.

Hibernate - A framework which is used to connect to database and built on JDBC.

Other Java technologies are: Android is developed in Java, Web services in Java.

Page 8: Service-Oriented Architecture With Java

Slide 8 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Java Versions

JDK 1.0 (Java 1)

Jan 21, 1996

JDK 1.1 (Java 1)

Feb 19, 1997

J2SE 1.2 (Java 2)

Dec 8, 1998

J2SE 1.3 (Kestrel)

J2SE 1.4 (Merlin)

May 8, 2000

Feb 6, 2002

J2SE 5.0 (Tiger)

Sep 30, 2004

Java SE 6 (Mustang)

Dec 11, 2006

Java SE 7(Dolphin)

July 28, 2011

Stable

Java SE 8(Java 8)

Mar 18, 2014

To check which version is running in yoursystem execute the function “java – version”

Java SE 7 will be used in this course.

Page 9: Service-Oriented Architecture With Java

Slide 9 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Use-cases of SOA

SOA is used in the following domains:

Banking - For debit card and credit cardauthorization. Credit card/debit card information istaken from the user and sent for authorization andthe bank responds whether the transaction isapproved or declined.

Page 10: Service-Oriented Architecture With Java

Slide 10 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Use-cases of SOA (Contd.)

SOA is used in the following domains:

Manufacturing - For inventory management. Ifan item reduces below the minimum inventorylevel then automatically an indication is sent tothe dealer for the supply.

Page 11: Service-Oriented Architecture With Java

Slide 11 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

SOA is used in the following domains:

Insurance - To take up insurance of the employeesin companies. When an employee joins, his/herdetails are sent to insurance company over theweb for the employee’s insurance.

And many more...

Use-cases of SOA (Contd.)

Page 12: Service-Oriented Architecture With Java

Slide 12 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Companies Using SOA

In the banking sector – ICICI bank,HDFC Bank, UTI bank and many morebanks are using SOA architecture.

Page 13: Service-Oriented Architecture With Java

Slide 13 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Companies Using SOA

In IT Sector – IBM, HP, Oracle,Google, Amazon and many more.

Page 14: Service-Oriented Architecture With Java

Slide 14 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Companies Using SOA

Manufacturing – Apollo tyres, Maruthi, Hyundai etc.

Page 15: Service-Oriented Architecture With Java

Slide 15 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Companies Using SOA

Healthcare – Harvard medical school and its hospitals.

Page 16: Service-Oriented Architecture With Java

Slide 16 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Jobs Trend in SOA

Page 17: Service-Oriented Architecture With Java

Slide 17 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Why SOA?

If there is no expertise in developing the services but still if an organization has developed it in-house then time taken to deliver these services will be more and the cost of development also goes up. To avoid these issues, SOA can be used.

There was difficulty in interoperability. This means, ability of a computer system to run application programs from different vendors/locations, and to interact with other computers across local or wide-area networks regardless of their physical architecture and operating systems. With the invent of SOA, this issue is resolved.

Page 18: Service-Oriented Architecture With Java

Slide 18 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Advantages of SOA

Speed of delivering service to customers increased.

Cost reduced.

Customer can get reliable delivery.

Customer service is improved.

Can communicate with similar/dis-similar systems for exchanging information/data.

Business workflow can be managed easily.

Business changes are easily integrated with business layer.

Page 19: Service-Oriented Architecture With Java

Slide 19 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

SOA - Introduction

SOA stands for Service Oriented Architecture. It is a design pattern or software architecturewhich provides application functionality as service to other applications. SOA functionality is notdepending on any vendor, product or application.

One of the functionality provided by SOA is getting online bank statement. This functionality canbe combined with other features of the application to provide the full fledged application. Theapplication will use the service provided by the vendor over the network without humaninteraction.

A simple meaning of SOA - Functionality/Functions provided by a vendor over internet/networkfor a cost/no-cost.

Page 20: Service-Oriented Architecture With Java

Slide 20 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

SOA - Architecture

ServiceBroker

ServiceConsumer

ServiceProvider

Client Service

ServiceContract…...…….

PublishFind

Interact

Page 21: Service-Oriented Architecture With Java

Slide 21 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

SOA - Architecture

Service 1

Service 2

Service 3

Service 4

Service 5

Service 6

Service 7

Service 8

Security

Service Layer

Application 1 Application 2 Application 3Web

ApplicationC

om

mo

n

CRMApplication Database

Reporting

Page 22: Service-Oriented Architecture With Java

Slide 22 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

SOA – Architecture in Detail

Consumer

Consumer Layer Integration Layer Business Process Layer

Service Layer

Component Layer

Operational Systems Layer

Page 23: Service-Oriented Architecture With Java

Slide 23 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

SOA – Framework

Consumer Interface Layer - This layer is used by the customers.

Business Process Layer - Provides the business process flow. Also accommodates new changes in the business easily, hence this layer is provided.

Service Layer - This layer comprises of all the services in the enterprise.

Component Layer - This layer has the actual service to be provided.

Operational Systems Layer - This layer contains the data models.

Page 24: Service-Oriented Architecture With Java

Slide 24 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Principles of SOA

Service Loose Coupling - Service does not have high dependency which is obtained throughloose coupling.

Service Abstraction - Service hides the implementation from outside world.

Service Reusability - Services can be used again and again instead of rewriting them.

Service Statelessness - They usually do not maintain the state to reduce the resourceconsumption.

Service Discoverability - Services are registered in registry. Client can discover them in theservice registry.

Page 25: Service-Oriented Architecture With Java

Slide 25 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Web Services Introduction

SOA is the concept and using Web services SOA can be built.

Web services are the services provided on the net. Producers will create services andpublish. Consumers look for the services and connect with the producers and will accessthe required services.

Web services can be implemented using SOAP - Simple Object Access Protocol an XMLbased protocol or using Restful Services which uses HTTP protocol.

Page 26: Service-Oriented Architecture With Java

Slide 26 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

SOAP

SOAP is a protocol to access Web services.

SOAP stands for Simple Object Access Protocol. This protocol is based on XML.

SOAP was designed in 1998 by Dave Winer, Don Box, Bob Atkinson, and Mohsen Al-Ghose.

Request 1 Request 1

Response1 Response1

SOAPmessage context

SOAPmessage context

Handler 1 Handler 2

Client

Request 1

Response1

SOAPmessage context

Handler

ServiceSOAP

Service Requester Service Provider

Page 27: Service-Oriented Architecture With Java

Slide 27 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

SOAP - Example

For example: If we want to get the approval/declined status for credit card transaction frombank using SOAP, following steps to be done/will be executed:

In client module, write the details about the customer details like credit card, account number,expiry date, CVV2 etc., in SOAP format.

This SOAP message is sent on web to web service which provides the desired service.

The web service unpacks the SOAP message and converts into a command that theapplication can understand. Application will get the credit card information. It does therequired processing and generates the response either approval/declined status in SOAPmessage.

This SOAP message is sent back to the client.

Client unpacks the SOAP message and gets the required information.

Page 28: Service-Oriented Architecture With Java

Slide 28 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Credit card account numberexpiry dateCVV2……..

Client Module

SOAP Format

Output in

Web

Web Service

unpacks the SOAP messageand converts into a commandthat the application canunderstand

SOAP Message

SOAP – Flow Diagram

Page 29: Service-Oriented Architecture With Java

Slide 29 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

SOAP Files - WSDL, Client Generation

Server

Java Code - which does the actual operation/provides the service.

WSDL File - Web Service Description Language. This file says the information about theservices like the functions and what input it takes and what output it generates etc.

Client

Using WSDL file, we can generate the client and can execute the web services.

Page 30: Service-Oriented Architecture With Java

Slide 30 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Restful Services

REST is based on web standards and HTTP Protocol. REST first was defined by Roy Fielding in2000.

In REST based architecture, everything is a resource. The resource is accessed by HTTPmethods.

RESTful services support HTTP methods like GET, POST, HEAD, DELETE etc., like SOAP has clientserver, even REST should have a Server which provides the service and a Client to access theservice.

To access the server method, client invokes the server method using an URL as done in servlets.Server method takes the input, processes it and responds back to the client. This way anyoperation/service can be executed on web.

Page 31: Service-Oriented Architecture With Java

Slide 31 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

DEMO

Page 32: Service-Oriented Architecture With Java

Questions

www.edureka.co/java-j2ee-soa-trainingSlide 32 Twitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Page 33: Service-Oriented Architecture With Java

Slide 33 www.edureka.co/java-j2ee-soa-trainingTwitter @edurekaIN, Facebook /edurekaIN, use #askEdureka for Questions

Course Topics

Module 1 » Introduction to Java

Module 2» Data Handling and Functions

Module 3 » Object Oriented Programming in Java

Module 4 » Packages and Multi-threading

Module 5 » Collections

Module 6 » XML

Module 7» JDBC

Module 8 » Servlets

Module 9» JSP

Module 10 » Hibernate

Module 11 » Spring

Module 12 » Spring, Ajax and Design Patterns

Module 13 » SOA

Module 14» Web Services

Page 34: Service-Oriented Architecture With Java