2. Popular Distributed Application Frameworks/Technologies 2010-02-08 2 COM, DCOM Microsoft specific EJB, RMI Java Specific CORBA Platform and Language Independent
3.
4. What is Service ? 2010-02-08 4 Self-contained module that perform a predetermined task Software component that have published contracts/interfaces Black-box to the consumers Platform-Independent Interoperable
5. Why SOA? 2010-02-08 5 End Customer Portal Operator Portal Partner Portal Customer Info Management Order Management Credit Management Sales Management Billing Lets take a telecom enterprise system Invoicing Provisioning Network Management Inventory Service Catalog Customer Profiles
6. Why SOA? 2010-02-08 6 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
7. SOA: Architectural Principles 2010-02-08 7 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.
8. SOA: Architectural Principles 2010-02-08 8 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.
9. SOA Implementation 2010-02-08 9 While SOA can be implemented using any service based technology such as CORBA, 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
11. What is web service ? 2010-02-08 11 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.
12.
13. Components of a web service 2010-02-08 14 XML (eXtensible Markup 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
15. Service Vs. Consumer 2010-02-08 16 Policy Adheres to governed by End Point Binds to Exposes Serves Service Consumer Service Contracts implements Understands describes Messages Sends/Receives Sends/Receives
16. Steps to develop a web serviceusing JAX-WS 2010-02-08 17 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 . 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 + "!"; } }
20. Steps to develop a web service contd… 2010-02-08 21 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(); } } } Implement Client Code 5. Use wsimport to generate and compile the web service artifacts needed to connect to the service. S>wsimport HelloImplService.wsdl parsing WSDL... generating code... compiling code... 6. Run the client.
21. WSDL 2010-02-08 22 WSDL elements 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 Types Message Operation Port Type WSDL Binding Port Service
22. WSDL elements 2010-02-08 23 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
23. SOAP 2010-02-08 24 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
25. SOAP Fault 2010-02-08 26 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.
26. UDDI 2010-02-08 27 3 levels of information in UDDI 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. 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
53. RESTful web services 2010-02-08 31 REpresentationalState Transfer 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.
60. Developing a RESTful web service using JAX-WS 2010-02-08 34 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) { ... … } }
61. 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 35
62. Web service security standards 2010-02-08 36 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) ebXML Message Service (OASIS)
63. The way forward 2010-02-08 37 SOAD SOSE ED SOA ESB SoaML BPEL SOA-Tel SOA Reference Architecture
64. For more information 2010-02-08 38 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