SlideShare une entreprise Scribd logo
1  sur  57
Service Oriented Architectureand Web services Mohammed LuqmanShareef me@luqmanshareef.com
2010-02-08 www.luqmanshareef.com 2 Popular Distributed Application Frameworks/Technologies
COM, DCOM Microsoft specific EJB, RMI	Java Specific CORBA  	Platform and Language Independent 2010-02-08 www.luqmanshareef.com 3 Popular Distributed Application Frameworks/Technologies
A software system is divided into highly flexible and re-usable components called services.  SOA is just an architecture blue print  It is NOT a technical standard It is NOT a technology 2010-02-08 www.luqmanshareef.com 4 What is SOA? ,[object Object],Coarse grained Loosely coupled Platform independent Standard Interface
Self-contained module that perform a predetermined task Software component that have published contracts/interfaces Black-box to the consumers Platform-Independent Interoperable 2010-02-08 www.luqmanshareef.com 5 What is Service ?
Systems today are bigger than ever before Complexity increases exponentially with size Systems need to be interconnected OO solved the problems of small-medium sized systems CO (Component Orientation) solved problems of medium-large systems Neither OO nor CO could cope with the problems of very large systems, systems of systems, or integration between systems Why SOA? 2010-02-08 6 www.luqmanshareef.com
2010-02-08 www.luqmanshareef.com 7 Why SOA? End Customer Portal Operator Portal Partner Portal Customer Info Management Order Management Credit Management Sales Management Billing Invoicing Provisioning Network Management Inventory Service Catalog Customer Profiles
2010-02-08 www.luqmanshareef.com 8 Why SOA? End Customer Portal Operator Portal Partner Portal Services Credit Management Sales Management Customer Info Management Order Management Provisioning Invoicing Inventory Network Management Customer Profiles Billing Service Catalog
Towards Service-Oriented Architecture ,[object Object]
Build to change
Incrementally built and deployed
Enterprise solutions
Loosely coupled
Message oriented
Abstraction
Function oriented
Build to last
Prolonged development cycles
Application silos
Tightly coupled
Object oriented
Known implementation2010-02-08 9 www.luqmanshareef.com
Managing services Service governance Performance Reliability security SLAs Interoperability of services Challenges 2010-02-08 10 www.luqmanshareef.com
Loose coupling Minimize dependencies. Service contract Services adhere to a communications agreement. Service abstraction  Hide the service execution logic from the outside world. Service reusability Logic is divided into services for reuse. 2010-02-08 www.luqmanshareef.com 11 SOA: Architectural Principles
Service composability Services can be assembled to form composite service. Service autonomy Services have control over the logic they encapsulate. Service discoverability Services can be found and assessed via available discovery mechanisms. Service relevance 		Service presented at a granularity recognized by user a meaningful service. 2010-02-08 www.luqmanshareef.com 12 SOA: Architectural Principles
	SOA can be implemented using any service based technology such as CORBA, but the SOAP based web services standard implementation has gained wide industry acceptance, because these standards provide greater interoperability. 	Key differences between CORBA and web service are 2010-02-08 www.luqmanshareef.com 13 SOA Implementation
2010-02-08 www.luqmanshareef.com 14 Realizing SOA with Web Services
Web service is a standard way of integrating Web-based applications using the XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone.  	XML is used to tag the data,  	SOAP is used to transfer the data,  	WSDL is used for describing the services available and  	UDDI is used for listing what services are available.  	Web services are loosely coupled computing services that can reduce the complexity of building business applications, save costs, and enable new business models. Services running on an arbitrary machine can be accessed in a platform- and language-independent fashion. 2010-02-08 www.luqmanshareef.com 15 What is web service ?
Lookup for the tomato sellers Yellow Pages: contain companies that are selling tomatoes, their location, and contact information.  2010-02-08 www.luqmanshareef.com 16 How to buy tomatoes ? ,[object Object],Where, when and how can I buy tomatoes?  ,[object Object],Do the  transaction
Lookup for the Service Provider Registry: contain providers that are selling services, their location, and contact information.  Find the service offered according to my needs Where, when and how can I get the service?  Access the servicedo the transaction  2010-02-08 www.luqmanshareef.com 17 How to access a service?
XML (eXtensibleMarkup Language) A uniform data representation and exchange mechanism SOAP (Simple Object Access Protocol) Lightweight (XML-based) protocol for exchange  	of information in a decentralized, distributed environment WSDL (Web Service Description Language) XML format that describes the web service UDDI (Universal Description Discovery and Integration) Like yellow pages of Web services 2010-02-08 www.luqmanshareef.com 18 Components of a web service
2010-02-08 www.luqmanshareef.com 19 3 roles of service
2010-02-08 www.luqmanshareef.com 20 Service Vs. Consumer Policy Adheres to governed by End Point Binds to Exposes Serves Service  Consumer Service Contracts implements Understands describes Messages Sends/Receives Sends/Receives
Define the service implementation and compile it. 	S>javac -d . HelloImpl.java Use wsgen to generate the artifacts required to deploy the service. 	S>wsgen -wsdlserver.HelloImpl 3.   Package the files into a WAR file and deploy it . 2010-02-08 www.luqmanshareef.com 21 Steps to develop a web serviceusing JAX-WS package server; import javax.jws.WebService; @WebService public class HelloImpl {   /**    * @param name    * @return Say hello to the person.    */    public String sayHello(String name) {      return "Hello, " + name + "!";    } }
2010-02-08 www.luqmanshareef.com 22 HelloImplService.wsdl
2010-02-08 www.luqmanshareef.com 23 HelloImplService.wsdl contd…
2010-02-08 www.luqmanshareef.com 24 HelloImplService_schema1.xsd
Implement Client Code 5.  Use wsimport to generate and compile the web service artifacts needed to connect to the service. 	S>wsimportHelloImplService.wsdl 	parsing WSDL... 	generating code... 	compiling code... 6.  Run the client. 2010-02-08 www.luqmanshareef.com 25 Steps to develop a web service contd… package myClient; import helloservice.endpoint.HelloService; import helloservice.endpoint.Hello; public class HelloClient {     public static void main(String[] args) {         try { HelloService service = new HelloService();             Hello port = service.getHelloPort();             String response = port.sayHello(“Luqman"); System.out.println(response);         } catch (Exception e) { e.printStackTrace();         }     } }
WSDL is a contract between service provider and the consumer A WSDL document describes What the service can do Where it resides How to invoke it 2010-02-08 www.luqmanshareef.com 26 WSDL WSDL elements Types Message Operation Port Type WSDL Binding Port Service
Types 	Data type definition used in exchanging messages Message 	Describes the logical content of data being communicated Operation 	An Abstract description of an action supported by the service Port Type 	A set of operations and messages involved with the service Binding 	A concrete protocol and data format specification for a port type Port 	A single end point defined as a combination of a binding and a network address Service 	Identifies which ports to group together 2010-02-08 www.luqmanshareef.com 27 WSDL elements
2010-02-08 www.luqmanshareef.com 28 SOAP SOAP Envelope SOAP Header Header Block SOAP Body Message Body Fault Handlers SOAP message structure SOAP is a lightweight (XML-based) protocol for exchange of information in a decentralized, distributed environment.  SOAP is a format for sending messages SOAP is independent of transport protocol A SOAP message is an ordinary XML document containing the following elements: Envelope  - identifies the XML document as a SOAP message Header  - contains application specific info like authentication etc. Body  - contains the message in request and response Fault  - contains errors and status information
<?xml version="1.0"?><soap:Envelopexmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"><soap:Bodyxmlns:m="http://www.example.org/Hello">  <m:sayHello>    <m:name>Luqman</m:name>  </m:sayHello></soap:Body></soap:Envelope>  2010-02-08 www.luqmanshareef.com 29 SOAP Example Request Response <?xml version="1.0"?><soap:Envelopexmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"><soap:Bodyxmlns:m="http://www.example.org/stock">  <m:sayHelloResponse>    <m:return>Hello Luqman</m:return>  </m:sayHelloResponse></soap:Body></soap:Envelope>
SOAP errors are handled using a specialised envelope known as a Fault Envelope A SOAP Fault is a special element which must appear as an immediate child of the body element <faultcode> and <faultstring> are required. 2010-02-08 www.luqmanshareef.com 30 SOAP Fault
Printing SOAP Message public class MySOAPHandler implements SOAPHandler<SOAPMessageContext>{   public booleanhandleMessage(SOAPMessageContext context) {     try { SOAPMessage message = context.getMessage();       if ((Boolean)context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY) == true){ System.out.println("Request Message: ");         }else{ System.out.println("Response Message: ");         } message.writeTo(System.out);     } catch (Exception ex) { ex.printStackTrace();     }     return true;   }   public Set<QName> getHeaders() { return null;  }   public booleanhandleFault(SOAPMessageContext context) { return true; }   public void close(MessageContext context) {  } } Wite a new Class  MySOAPHandler Implement handleMessage 2010-02-08 31 www.luqmanshareef.com
Printing SOAP Message contd... public class MyMessageHandlerResolver implements HandlerResolver {   public List<Handler> getHandlerChain(PortInfoportInfo) {     List<Handler> handlerChain = new ArrayList<Handler>(); MySOAPHandlerhh = new MySOAPHandler(); handlerChain.add(hh);     return handlerChain;   } } Wite a new Class  MyHandlerResolver Implement getHandleChain Set the Handler Resolver in Client Invoke the web method Run the client service.setHandlerResolver(new MyMessageHandlerResolver()); 2010-02-08 32 www.luqmanshareef.com
UDDI is a set of specifications that is used to publish information for describing and discovering web services, finding businesses, building registries.  UDDI is a directory for storing information about web services. UDDI communicates via SOAP. 2010-02-08 www.luqmanshareef.com 33 UDDI 3 levels of information in UDDI White Pages To query companies with their names and attributes Yellow Pages To query businesses with their categories Green Pages Contains technical info on how to interact with the services
2010-02-08 www.luqmanshareef.com 34 UDDI Structure
2010-02-08 www.luqmanshareef.com 35 Registry APIs (SOAP Messages) ,[object Object]
Save things
save_business
save_service
save_binding
save_tModel
Delete things
delete_business
delete_service
delete_binding

Contenu connexe

Tendances

Web Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETWeb Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NET
Ponraj
 
Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)
Martin Necasky
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overview
Raveendra Bhat
 

Tendances (20)

Web Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETWeb Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NET
 
Web Services
Web ServicesWeb Services
Web Services
 
Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)
 
Web service Introduction
Web service IntroductionWeb service Introduction
Web service Introduction
 
Introduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web ServicesIntroduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web Services
 
Java Web Services [3/5]: WSDL, WADL and UDDI
Java Web Services [3/5]: WSDL, WADL and UDDIJava Web Services [3/5]: WSDL, WADL and UDDI
Java Web Services [3/5]: WSDL, WADL and UDDI
 
Develop ASP.Net Web Service
Develop ASP.Net Web Service Develop ASP.Net Web Service
Develop ASP.Net Web Service
 
Web service introduction 2
Web service introduction 2Web service introduction 2
Web service introduction 2
 
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
 
Web service
Web serviceWeb service
Web service
 
Soap web service
Soap web serviceSoap web service
Soap web service
 
Web service introduction
Web service introductionWeb service introduction
Web service introduction
 
Web services
Web servicesWeb services
Web services
 
WebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIWebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDI
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
Web services
Web servicesWeb services
Web services
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overview
 
Introduction to web services and how to in php
Introduction to web services and how to in phpIntroduction to web services and how to in php
Introduction to web services and how to in php
 
Web Services
Web ServicesWeb Services
Web Services
 
Web Service
Web ServiceWeb Service
Web Service
 

En vedette

Tss Reference Architecture Reduced
Tss Reference Architecture   ReducedTss Reference Architecture   Reduced
Tss Reference Architecture Reduced
aadly
 
11 literaturverzeichnis und_empfehlungen_fh_salzburg_multimedia_technologie_s...
11 literaturverzeichnis und_empfehlungen_fh_salzburg_multimedia_technologie_s...11 literaturverzeichnis und_empfehlungen_fh_salzburg_multimedia_technologie_s...
11 literaturverzeichnis und_empfehlungen_fh_salzburg_multimedia_technologie_s...
guest3dd56a
 
Reference Architecture for Shared Services Hosting_SunilBabu_V2.0
Reference Architecture for Shared Services Hosting_SunilBabu_V2.0Reference Architecture for Shared Services Hosting_SunilBabu_V2.0
Reference Architecture for Shared Services Hosting_SunilBabu_V2.0
Sunil Babu
 
Design Time and Run Time Governance
Design Time and Run Time Governance Design Time and Run Time Governance
Design Time and Run Time Governance
WSO2
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented Architecture
Robert Sim
 
Rm 01-last
Rm 01-lastRm 01-last
Rm 01-last
tomkacy
 
Hadoop Enterprise Readiness
Hadoop Enterprise ReadinessHadoop Enterprise Readiness
Hadoop Enterprise Readiness
ad17633
 
Fnul selling techniques and handling objection
Fnul selling techniques and handling objectionFnul selling techniques and handling objection
Fnul selling techniques and handling objection
Pik Lertsavetpong
 
Millward brown adreaction-2014-usa
Millward brown adreaction-2014-usaMillward brown adreaction-2014-usa
Millward brown adreaction-2014-usa
Andrew Ornatsky
 

En vedette (20)

Soa best practice
Soa best practiceSoa best practice
Soa best practice
 
Tss Reference Architecture Reduced
Tss Reference Architecture   ReducedTss Reference Architecture   Reduced
Tss Reference Architecture Reduced
 
11 literaturverzeichnis und_empfehlungen_fh_salzburg_multimedia_technologie_s...
11 literaturverzeichnis und_empfehlungen_fh_salzburg_multimedia_technologie_s...11 literaturverzeichnis und_empfehlungen_fh_salzburg_multimedia_technologie_s...
11 literaturverzeichnis und_empfehlungen_fh_salzburg_multimedia_technologie_s...
 
Reference Architecture for Shared Services Hosting_SunilBabu_V2.0
Reference Architecture for Shared Services Hosting_SunilBabu_V2.0Reference Architecture for Shared Services Hosting_SunilBabu_V2.0
Reference Architecture for Shared Services Hosting_SunilBabu_V2.0
 
SOA @ T-Mobile: Automatic Service Provisioning to the ESB
SOA @ T-Mobile: Automatic Service Provisioning to the ESBSOA @ T-Mobile: Automatic Service Provisioning to the ESB
SOA @ T-Mobile: Automatic Service Provisioning to the ESB
 
Design Time and Run Time Governance
Design Time and Run Time Governance Design Time and Run Time Governance
Design Time and Run Time Governance
 
Principles of Service-Oriented Architecture
Principles of Service-Oriented ArchitecturePrinciples of Service-Oriented Architecture
Principles of Service-Oriented Architecture
 
Service Oriented Architecture and Business Process Modeling Overview
Service Oriented Architecture and Business Process Modeling OverviewService Oriented Architecture and Business Process Modeling Overview
Service Oriented Architecture and Business Process Modeling Overview
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented Architecture
 
Rm 01-last
Rm 01-lastRm 01-last
Rm 01-last
 
Problem solving
Problem solvingProblem solving
Problem solving
 
Hadoop Enterprise Readiness
Hadoop Enterprise ReadinessHadoop Enterprise Readiness
Hadoop Enterprise Readiness
 
20120509 hsa business-week
20120509 hsa business-week20120509 hsa business-week
20120509 hsa business-week
 
SCI Magazine Aug 2010
SCI Magazine Aug 2010SCI Magazine Aug 2010
SCI Magazine Aug 2010
 
Artikel Original Teori Ukuran Perusahaan
Artikel Original Teori Ukuran PerusahaanArtikel Original Teori Ukuran Perusahaan
Artikel Original Teori Ukuran Perusahaan
 
梁希 工业设计工071 拆装玩具
梁希 工业设计工071 拆装玩具梁希 工业设计工071 拆装玩具
梁希 工业设计工071 拆装玩具
 
Learning resources
Learning resourcesLearning resources
Learning resources
 
Fnul selling techniques and handling objection
Fnul selling techniques and handling objectionFnul selling techniques and handling objection
Fnul selling techniques and handling objection
 
Indian Pharma - Top Guns Brainstorm at BrandStorm and FFE 2015
Indian Pharma - Top Guns Brainstorm at BrandStorm and FFE 2015Indian Pharma - Top Guns Brainstorm at BrandStorm and FFE 2015
Indian Pharma - Top Guns Brainstorm at BrandStorm and FFE 2015
 
Millward brown adreaction-2014-usa
Millward brown adreaction-2014-usaMillward brown adreaction-2014-usa
Millward brown adreaction-2014-usa
 

Similaire à Service Oriented Architecture Luqman

Service Oriented Architecture Updated Luqman
Service Oriented Architecture Updated  LuqmanService Oriented Architecture Updated  Luqman
Service Oriented Architecture Updated Luqman
guesteb791b
 
webservices overview
webservices overviewwebservices overview
webservices overview
elliando dias
 

Similaire à Service Oriented Architecture Luqman (20)

Service Oriented Architecture Updated Luqman
Service Oriented Architecture Updated  LuqmanService Oriented Architecture Updated  Luqman
Service Oriented Architecture Updated Luqman
 
Web services concepts, protocols and development
Web services concepts, protocols and developmentWeb services concepts, protocols and development
Web services concepts, protocols and development
 
Unit 5 WEB TECHNOLOGIES
Unit 5 WEB TECHNOLOGIES Unit 5 WEB TECHNOLOGIES
Unit 5 WEB TECHNOLOGIES
 
WebService-Java
WebService-JavaWebService-Java
WebService-Java
 
Performance of Web Services on Smart Phone Platforms
Performance of Web Services on Smart Phone PlatformsPerformance of Web Services on Smart Phone Platforms
Performance of Web Services on Smart Phone Platforms
 
web technologies Unit 5
 web technologies Unit 5 web technologies Unit 5
web technologies Unit 5
 
Service view
Service viewService view
Service view
 
Cloud computing 20 service modelling
Cloud computing 20 service modellingCloud computing 20 service modelling
Cloud computing 20 service modelling
 
Overview of web services
Overview of web servicesOverview of web services
Overview of web services
 
webservices overview
webservices overviewwebservices overview
webservices overview
 
Web services
Web servicesWeb services
Web services
 
Anatomy Of A Web Service
Anatomy Of A Web ServiceAnatomy Of A Web Service
Anatomy Of A Web Service
 
Dot net training-navimumbai
Dot net training-navimumbaiDot net training-navimumbai
Dot net training-navimumbai
 
Context And Concept Of Web Services
Context And Concept Of Web ServicesContext And Concept Of Web Services
Context And Concept Of Web Services
 
Web Services in Cloud Computing.pptx
Web Services in Cloud Computing.pptxWeb Services in Cloud Computing.pptx
Web Services in Cloud Computing.pptx
 
Description of soa and SOAP,WSDL & UDDI
Description of soa and SOAP,WSDL & UDDIDescription of soa and SOAP,WSDL & UDDI
Description of soa and SOAP,WSDL & UDDI
 
Web programming
Web programmingWeb programming
Web programming
 
Sreerag what is a web service
Sreerag   what is a web serviceSreerag   what is a web service
Sreerag what is a web service
 
A Study Of Web Services And Its Implications
A Study Of Web Services And Its ImplicationsA Study Of Web Services And Its Implications
A Study Of Web Services And Its Implications
 
Web Services
Web ServicesWeb Services
Web Services
 

Plus de Luqman Shareef (9)

Containers virtaulization and docker
Containers virtaulization and dockerContainers virtaulization and docker
Containers virtaulization and docker
 
Restful webservices
Restful webservicesRestful webservices
Restful webservices
 
Scrum luqman
Scrum luqmanScrum luqman
Scrum luqman
 
Tech Days 2010
Tech  Days 2010Tech  Days 2010
Tech Days 2010
 
Ajax
AjaxAjax
Ajax
 
Xml by Luqman
Xml by LuqmanXml by Luqman
Xml by Luqman
 
Web Service Security
Web Service SecurityWeb Service Security
Web Service Security
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented Architecture
 
J2SE 5
J2SE 5J2SE 5
J2SE 5
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Service Oriented Architecture Luqman

  • 1. Service Oriented Architectureand Web services Mohammed LuqmanShareef me@luqmanshareef.com
  • 2. 2010-02-08 www.luqmanshareef.com 2 Popular Distributed Application Frameworks/Technologies
  • 3. COM, DCOM Microsoft specific EJB, RMI Java Specific CORBA Platform and Language Independent 2010-02-08 www.luqmanshareef.com 3 Popular Distributed Application Frameworks/Technologies
  • 4.
  • 5. Self-contained module that perform a predetermined task Software component that have published contracts/interfaces Black-box to the consumers Platform-Independent Interoperable 2010-02-08 www.luqmanshareef.com 5 What is Service ?
  • 6. Systems today are bigger than ever before Complexity increases exponentially with size Systems need to be interconnected OO solved the problems of small-medium sized systems CO (Component Orientation) solved problems of medium-large systems Neither OO nor CO could cope with the problems of very large systems, systems of systems, or integration between systems Why SOA? 2010-02-08 6 www.luqmanshareef.com
  • 7. 2010-02-08 www.luqmanshareef.com 7 Why SOA? End Customer Portal Operator Portal Partner Portal Customer Info Management Order Management Credit Management Sales Management Billing Invoicing Provisioning Network Management Inventory Service Catalog Customer Profiles
  • 8. 2010-02-08 www.luqmanshareef.com 8 Why SOA? End Customer Portal Operator Portal Partner Portal Services Credit Management Sales Management Customer Info Management Order Management Provisioning Invoicing Inventory Network Management Customer Profiles Billing Service Catalog
  • 9.
  • 22. Known implementation2010-02-08 9 www.luqmanshareef.com
  • 23. Managing services Service governance Performance Reliability security SLAs Interoperability of services Challenges 2010-02-08 10 www.luqmanshareef.com
  • 24. Loose coupling Minimize dependencies. Service contract Services adhere to a communications agreement. Service abstraction Hide the service execution logic from the outside world. Service reusability Logic is divided into services for reuse. 2010-02-08 www.luqmanshareef.com 11 SOA: Architectural Principles
  • 25. Service composability Services can be assembled to form composite service. Service autonomy Services have control over the logic they encapsulate. Service discoverability Services can be found and assessed via available discovery mechanisms. Service relevance Service presented at a granularity recognized by user a meaningful service. 2010-02-08 www.luqmanshareef.com 12 SOA: Architectural Principles
  • 26. SOA can be implemented using any service based technology such as CORBA, but the SOAP based web services standard implementation has gained wide industry acceptance, because these standards provide greater interoperability. Key differences between CORBA and web service are 2010-02-08 www.luqmanshareef.com 13 SOA Implementation
  • 27. 2010-02-08 www.luqmanshareef.com 14 Realizing SOA with Web Services
  • 28. Web service is a standard way of integrating Web-based applications using the XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone. XML is used to tag the data, SOAP is used to transfer the data, WSDL is used for describing the services available and UDDI is used for listing what services are available. Web services are loosely coupled computing services that can reduce the complexity of building business applications, save costs, and enable new business models. Services running on an arbitrary machine can be accessed in a platform- and language-independent fashion. 2010-02-08 www.luqmanshareef.com 15 What is web service ?
  • 29.
  • 30. Lookup for the Service Provider Registry: contain providers that are selling services, their location, and contact information. Find the service offered according to my needs Where, when and how can I get the service? Access the servicedo the transaction 2010-02-08 www.luqmanshareef.com 17 How to access a service?
  • 31. XML (eXtensibleMarkup Language) A uniform data representation and exchange mechanism SOAP (Simple Object Access Protocol) Lightweight (XML-based) protocol for exchange of information in a decentralized, distributed environment WSDL (Web Service Description Language) XML format that describes the web service UDDI (Universal Description Discovery and Integration) Like yellow pages of Web services 2010-02-08 www.luqmanshareef.com 18 Components of a web service
  • 33. 2010-02-08 www.luqmanshareef.com 20 Service Vs. Consumer Policy Adheres to governed by End Point Binds to Exposes Serves Service Consumer Service Contracts implements Understands describes Messages Sends/Receives Sends/Receives
  • 34. Define the service implementation and compile it. S>javac -d . HelloImpl.java Use wsgen to generate the artifacts required to deploy the service. S>wsgen -wsdlserver.HelloImpl 3. Package the files into a WAR file and deploy it . 2010-02-08 www.luqmanshareef.com 21 Steps to develop a web serviceusing JAX-WS package server; import javax.jws.WebService; @WebService public class HelloImpl { /** * @param name * @return Say hello to the person. */ public String sayHello(String name) { return "Hello, " + name + "!"; } }
  • 35. 2010-02-08 www.luqmanshareef.com 22 HelloImplService.wsdl
  • 36. 2010-02-08 www.luqmanshareef.com 23 HelloImplService.wsdl contd…
  • 37. 2010-02-08 www.luqmanshareef.com 24 HelloImplService_schema1.xsd
  • 38. Implement Client Code 5. Use wsimport to generate and compile the web service artifacts needed to connect to the service. S>wsimportHelloImplService.wsdl parsing WSDL... generating code... compiling code... 6. Run the client. 2010-02-08 www.luqmanshareef.com 25 Steps to develop a web service contd… package myClient; import helloservice.endpoint.HelloService; import helloservice.endpoint.Hello; public class HelloClient { public static void main(String[] args) { try { HelloService service = new HelloService(); Hello port = service.getHelloPort(); String response = port.sayHello(“Luqman"); System.out.println(response); } catch (Exception e) { e.printStackTrace(); } } }
  • 39. WSDL is a contract between service provider and the consumer A WSDL document describes What the service can do Where it resides How to invoke it 2010-02-08 www.luqmanshareef.com 26 WSDL WSDL elements Types Message Operation Port Type WSDL Binding Port Service
  • 40. Types Data type definition used in exchanging messages Message Describes the logical content of data being communicated Operation An Abstract description of an action supported by the service Port Type A set of operations and messages involved with the service Binding A concrete protocol and data format specification for a port type Port A single end point defined as a combination of a binding and a network address Service Identifies which ports to group together 2010-02-08 www.luqmanshareef.com 27 WSDL elements
  • 41. 2010-02-08 www.luqmanshareef.com 28 SOAP SOAP Envelope SOAP Header Header Block SOAP Body Message Body Fault Handlers SOAP message structure SOAP is a lightweight (XML-based) protocol for exchange of information in a decentralized, distributed environment. SOAP is a format for sending messages SOAP is independent of transport protocol A SOAP message is an ordinary XML document containing the following elements: Envelope - identifies the XML document as a SOAP message Header - contains application specific info like authentication etc. Body - contains the message in request and response Fault - contains errors and status information
  • 42. <?xml version="1.0"?><soap:Envelopexmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"><soap:Bodyxmlns:m="http://www.example.org/Hello">  <m:sayHello>    <m:name>Luqman</m:name>  </m:sayHello></soap:Body></soap:Envelope> 2010-02-08 www.luqmanshareef.com 29 SOAP Example Request Response <?xml version="1.0"?><soap:Envelopexmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"><soap:Bodyxmlns:m="http://www.example.org/stock">  <m:sayHelloResponse>    <m:return>Hello Luqman</m:return>  </m:sayHelloResponse></soap:Body></soap:Envelope>
  • 43. SOAP errors are handled using a specialised envelope known as a Fault Envelope A SOAP Fault is a special element which must appear as an immediate child of the body element <faultcode> and <faultstring> are required. 2010-02-08 www.luqmanshareef.com 30 SOAP Fault
  • 44. Printing SOAP Message public class MySOAPHandler implements SOAPHandler<SOAPMessageContext>{ public booleanhandleMessage(SOAPMessageContext context) { try { SOAPMessage message = context.getMessage(); if ((Boolean)context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY) == true){ System.out.println("Request Message: "); }else{ System.out.println("Response Message: "); } message.writeTo(System.out); } catch (Exception ex) { ex.printStackTrace(); } return true; } public Set<QName> getHeaders() { return null; } public booleanhandleFault(SOAPMessageContext context) { return true; } public void close(MessageContext context) { } } Wite a new Class MySOAPHandler Implement handleMessage 2010-02-08 31 www.luqmanshareef.com
  • 45. Printing SOAP Message contd... public class MyMessageHandlerResolver implements HandlerResolver { public List<Handler> getHandlerChain(PortInfoportInfo) { List<Handler> handlerChain = new ArrayList<Handler>(); MySOAPHandlerhh = new MySOAPHandler(); handlerChain.add(hh); return handlerChain; } } Wite a new Class MyHandlerResolver Implement getHandleChain Set the Handler Resolver in Client Invoke the web method Run the client service.setHandlerResolver(new MyMessageHandlerResolver()); 2010-02-08 32 www.luqmanshareef.com
  • 46. UDDI is a set of specifications that is used to publish information for describing and discovering web services, finding businesses, building registries. UDDI is a directory for storing information about web services. UDDI communicates via SOAP. 2010-02-08 www.luqmanshareef.com 33 UDDI 3 levels of information in UDDI White Pages To query companies with their names and attributes Yellow Pages To query businesses with their categories Green Pages Contains technical info on how to interact with the services
  • 48.
  • 72.
  • 73. Printing SOAP Message in AXIS Edit the generated code in AdderSoapBindingStub.class - In the corresponding method of the Stub class add the following lines of code after the _call.invoke(...) statement String requestMessage = _call.getMessageContext().getRequestMessage().getSOAPEnvelope().toString(); String responseMessage = _call.getMessageContext().getResponseMessage().getSOAPEnvelope().toString(); System.out.println(“Request SOAP Message” + requestMessage); System.out.println(“Request SOAP Message” + responseMessage); 2010-02-08 37 www.luqmanshareef.com
  • 74. Adding attachments to SOAP Message in AXIS Client Side Code CalculatorService service = new CalculatorServiceLocator(); Calculator calc = service.getcalculator(); Stub stub = (Stub) calc; FileDataSourcefs = new FileDataSource(new File("E:/Code/testA.txt") ); DataHandler dh = new DataHandler(fs); stub.addAttachment(dh); Display the Attachment in Stub Edit the generated code in AdderSoapBindingStub.class - In the corresponding method of the Stub class add the following lines of code after the _call.invoke(...) statement MessageContext message = _call.getMessageContext(); //.getRequestMessage(); Iterator it = message.getRequestMessage().getAttachments(); while (it.hasNext()) { AttachmentPart part = (AttachmentPart) it.next(); try { System.out.println("File Name : " + part.getDataHandler().getDataSource().getName()); InputStream is = part.getDataHandler().getInputStream(); while (is.available() > 0) { System.out.print((char) is.read()); } } catch (Exception ex) { ex.printStackTrace(); } 2010-02-08 38 www.luqmanshareef.com
  • 76. Each unique URL is a representation of some object Ex : http://www.mycompany.com/india/hyd/employees http://www. mycompany.com/india/hyd/employees/1234 HTTP GET Method operates on the resource. Object state is transferred and stored at client. Representation of the resource state in XML, JSON etc. 2010-02-08 www.luqmanshareef.com 40 RESTful web services REpresentationalState Transfer
  • 77.
  • 78. Resources themselves are the targets for method calls
  • 79. The list of methods is fixed for all resources2010-02-08 41 www.luqmanshareef.com
  • 80.
  • 81.
  • 82.
  • 85.
  • 86. 2010-02-08 www.luqmanshareef.com 44 Developing a RESTful web service using JAX-WS package com.sun.jersey.samples.helloworld.resources; import javax.ws.rs.GET; import javax.ws.rs.Produces; import javax.ws.rs.Path; @Path("/employees/{empid}") public class Employee{ @GET @Produces("text/xml") public String getEmployee(@PathParam(“empid") String empId) { ... … } }
  • 87. REST Annotations 2010-02-08 45 www.luqmanshareef.com
  • 88. REST Annotations 2010-02-08 46 www.luqmanshareef.com
  • 89. Securing web services SSL is not enough SSL provides point to point security WS needs end to end security SSL provides security at transport level WS needs security at message level SSL doesn’t support non-repudiation Non-repudiation is critical for business WS Web service security requirements Authentication ( Identity check ) Authorization ( Access Control ) Confidentiality ( Encryption ) Integrity ( Signature Support ) Non-repudiation ( Ability to prove that a particular transaction is performed) Accessibility ( Ensuring that the service is not impacted by attacks) 2010-02-08 www.luqmanshareef.com 47
  • 90. XML digital signature ( IETF and W3C) XML Encryption ( W3C) SAML (Secure Assertion Markup Language) ( OASIS) WS-Security (Web Services Security) (OASIS) WS-SecureConversation WS-Federation WS-Policy WS-Trust WS-Privacy XACML (Extensible Access Control Markup Language) (OASIS) 2010-02-08 www.luqmanshareef.com 48 Web service security standards
  • 91. “BPEL is an XML language for defining the composition of web services into new services” BPEL would require that every process Either has a “center” of execution A process is composed of a large set of orchestration definitions interacting with each other BPEL assumes that business processes can be fully captured in a single definition, including all possible exception paths Not sure this is the right assumption BPEL 2010-02-08 49 www.luqmanshareef.com
  • 92. Identify the partners in the process Declare the Partners in the Process Design the workflow of the process Define up the workflow process Declare the Process Using BPEL Activity Constructs Add Business Logic Using BPELConstructs BPEL Steps 2010-02-08 50 www.luqmanshareef.com
  • 93. Open source specification project from the Object Management Group (OMG), describing a UML profile and metamodel for the modeling and design of services within a service-oriented architecture. SoaML(SOA Modeling Language) 2010-02-08 51 www.luqmanshareef.com
  • 94. Dealer Network Architecture The dealer network is defined as a community “collaboration” involving three primary roles for participants in this community: the dealer, manufacturer, and shipper. The following diagram illustrates these roles and services in the dealer network architecture. SOAML Example 2010-02-08 52 www.luqmanshareef.com
  • 95. The enterprise service bus (ESB) is a software infrastructure that facilitates application integration. An ESB does not itself implement SOA but provides the features with which SOA can be implemented. Examples Glassfish ESB (Sun) Websphere ESB (IBM) Biztalk Server (Microsoft) JBOSS ESB ESB 2010-02-08 53 www.luqmanshareef.com
  • 96. Invocation Routing Mediation Message Processing Service Orchestration Complex Event Processing Management Common ESB Characteristics 2010-02-08 54 www.luqmanshareef.com
  • 97. SOAP - http://www.w3c.org/TR/soap WSDL - http://www.w3c.org/TR/wsdl UDDI - http://www.uddi.xml.org SAML - http://saml.xml.org ebXML - http://www.ebxml.org CORBA Vs. Web services - http://www2002.og/CDROM/alternate/395 SoaML - http://www.omg.org/spec/SoaML BPEL - www.oasis-open.org/committees/wsbpel 2010-02-08 www.luqmanshareef.com 55 For more information
  • 99. Thank You www.luqmanshareef.com 2010-02-08 www.luqmanshareef.com 57