Web Services PDF
Document Details
Uploaded by Deleted User
2020
Dr. M. Elarbi Badidi
Tags
Summary
This document is a lecture presentation on web services. It covers learning objectives, outline of topics, web services definitions, six key components, comparison with DCOM, CORBA etc, architectural perspective, details on architectures, web services applications and the industry, sun's jax pack, review of WSDL, UDDI etc.
Full Transcript
CSBP 461 Internet Computing: Web Services and their main Standards Dr. M. Elarbi Badidi Fall 2020 Learning Objectives Describe the Web services approach to the Service-Oriented Architecture concept Describe the WSDL specification and how it is used to define We...
CSBP 461 Internet Computing: Web Services and their main Standards Dr. M. Elarbi Badidi Fall 2020 Learning Objectives Describe the Web services approach to the Service-Oriented Architecture concept Describe the WSDL specification and how it is used to define Web services Describe the UDDI specification and how is used as a Web service discovery mechanism Provide detailed step-by-step examples of how to program Web services in Java 2 Outline What What isweb is a a web service? service? Why should we care about Web Services? How do Web Services and Java fit together? What is WSDL and how does it work? What is UDDI and how does it work? 3 Web Services Defined Web services are a new breed of Web application. They are self-contained, self-describing, modular applications that can be published, located, and invoked across the Web. Web services perform functions, which can be anything from simple requests to complicated business processes....Once a Web service is deployed, other applications (and other Web services) can discover and invoke the deployed service. -IBM’s tutorial on Web Services 4 The Six Key Components ▪ IBM’s definition identifies six key components of a web service: self-contained self-describing object-oriented modular applications published WSDL located UDDI invoked across the web SOAP or XML-RPC 5 Web Services Compared ▪ Why not use existing distributed, middleware solutions like RMI, CORBA, or DCOM? DCOM is proprietary, thus negating the goal of standards- based interoperability RMI is Java-based, and thus does not easily play well with other languages CORBA comes closer. It is standards-based, vendor-neutral, and language-agnostic. It is limited however by its inability to utilize the power and flexibility of the Internet ▪ Web Services are standards-based, vendor-neutral, language-agnostic, and they have been designed to leverage the service-centric, asynchronous nature of the Internet 6 Web Services Defined ▪ Web services are a new breed of Web application. They are self-contained, self-describing, modular applications that can be published, located, and invoked across the Web. ▪ Web services perform functions, which can be anything from simple requests to complicated business processes. ▪...Once a Web service is deployed, other applications (and other Web services) can discover and invoke the deployed service. ▪ ▪ -IBM’s tutorial on Web Services 7 Architectural Perspective ▪ A web service is essentially a standards-based façade, or wrapper for accessing non-standardized middleware components Web Server XML Request middleware Listener Web Business Service Service XML Response 8 Architectural Details Web Server SOAP or XML-RPC middleware HTTP CORBA, RMI, Listener Web RMI/IIOP, JMS, SOAP or XML-RPC Service Jini, DCOM, HTTP vendor-specific API, etc. ▪ SOAP and XML-RPC have become accepted standards for XML-based messaging. -- wire format ▪ HTTP is the defacto protocol for the Internet. – protocol ▪ The Web Service will parse the request and either fulfill the request directly, or invoke one or more business services via some middleware API. 9 Web Services Defined ▪ Web services are a new breed of Web application. They are self-contained, self-describing, modular applications that can be published, located, and invoked across the Web. ▪ Web services perform functions, which can be anything from simple requests to complicated business processes. ▪...Once a Web service is deployed, other applications (and other Web services) can discover and invoke the deployed service. ▪ ▪ -IBM’s tutorial on Web Services 10 Invoking a Web Service ▪ Invocation process Client queries a UDDI registry node Server returns a list of records matching request Client identifies a specific service of interest Server binds client to the service so client can invoke service methods 11 Web Services Applications ▪ Wrapper for other components Web-enable legacy applications Standard wrapper for any enterprise application Intranet architectural standard to reduce costs and improve development time and reliability Integrate middleware components, back-end resources, and legacy applications via a common, vendor-neutral, language- agnostic API ▪ B2B facilitator Faster time to market for integrating new partners into a supply chain or partner intranet Extranet portal enabler 12 More Web Services Applications ▪ Componentized E-services Web component that can be accessed asynchronously via it’s exposed interface for a price Macro component that serves as a façade for multiple micro- services ▪ Dynamic Business Enabler (“Smart Services”) Dynamic component that can be pieced together with other services on the fly to provide a unique aggregate service for a client Dynamic component that can be queried for its prices and services so that the “best deal” can be selected in real time given certain parameters. 13 Outline What is a web service? Why Why should should wewe carecare about about WebWeb Services? Services? How do Web Services and Java fit together? What is WSDL and how does it work? What is UDDI and how does it work? 14 Software Architecture Today ▪ Tightly-coupled Significant system changes (data model, web server, database, etc.) are difficult Changes to software architecture require unrelated components to be modified ▪ Long Development Cycles Slower time to market due to poor component reuse Additional time spent dealing with proprietary APIs ▪ Expensive High maintenance and integration costs due to a lack of standards and poor design 15 Web Services in a Nutshell ▪ Loosely Coupled Agreement on two things o wire format (HTML, XML, WML, etc.)–standardized o protocol (HTTP, SMTP, TCP/IP, etc.) Implementation details are hidden ▪ Coarse-Grained Cross-network communication must maximize efficiency by reducing network round-trips Service exposes a façade that may hide many smaller services used to fulfill the client’s request ▪ Asynchronous (yet conversational) Service-oriented requests cannot always be immediately performed (e.g. processing, approval, shipping, etc.) Ability to keep track of a “conversation” 16 Problem Solvency Status Quo Web Services Significant system changes are Loosely-coupled, standards- difficult based format and protocol Architectural changes require Coarse-grained, service- unrelated components to oriented request/reply change paradigm hides implementation Long development cycle due to Loosely-coupled, component- poor component reuse ized services are reusable and dynamically reconfigurable Lost time spent on proprietary Vendor-neutral standardization APIs of format and protocol High maintenance and Loosely-coupled, standards- integration costs based format and protocol 17 Web Services Industry ▪ Microsoft.NET The “.NET experience”, aimed at the consumer market “Imagine you wanted to turn up the heat in your house while you were away from home. You could use a.NET experience that controls your household utilities through a smart device. The device you use could be your desktop computer…smart phone…or a kiosk.” ▪ IBM Dynamic E-Business “It is the dynamic adaptation of e-business processes and associated systems to support changing business strategies and tactics.” “For the first time, large companies can be as flexible and agile as start-ups in finding better ways to be more competitive.” 18 Web Services Industry ▪ Sun ONE “Smart Web Services” – contextual Integrateable platform as opposed to.NET being integrated and proprietary ▪ MindElectric Glue A free SOAP framework designed to speed time to market for developing web service components Instantly publish any Java object as a web service ▪ Apache Group Axis, SOAP Open source SOAP implementations Cooperation with Microsoft to ensure interoperability with Microsoft SOAP 19 Outline What is a web service? Why should we care about Web Services? How HowdodoWeb Services Web and and Services Java fit Javatogether? fit together? What is WSDL and how does it work? What is UDDI and how does it work? 20 Implementing Web Services ▪ Web Services enable new kinds of applications, but they do not constitute these applications, nor do they build these applications ▪ It is still necessary to use a programming language to design the client and server pieces of the communication Java, C/C++, ASP, Perl, Ruby, etc. ▪ Web services merely serve as the glue between the client and server applications SOAP or Web Client App Service Server App XML-RPC 21 Java and Web Services ▪ Web Services are built on industry specifications with the following goals: language and vendor independent facilitate collaboration between applications as well as information exchange ▪ The Java platform is also built on industry specifications and has similar goals: platform independency (“Write Once Run Anywhere” ) vendor neutrality extensibility, integration, and simplified connectivity ▪ As a vendor-neutral, platform-independent language, Java is perfect for implementing web service applications 22 Componentization ▪ Web Services are componentized by nature, often being used as a wrapper for other components ▪ Java is a good implementation choice for several reasons: polymorphic support facilitates type-based selection of web services at runtime interface support cleanly decouples service architecture interface and encapsulation support facilitate good OO design techniques for exposing service methods inheritance allows for rapid creation of new services based on generic templates 23 Sun’s JAX Pack ▪ JAXP – Java API for XML Processing a standard API for parsing XML documents that is parser-neutral (similar to JDBC) ▪ JAXB – Java API for XML Binding maps XML elements to Java classes ▪ JAXM – Java API for XML Messaging provides an API to allow Java components to send SOAP messages via HTTP ▪ JAXR – Java API for XML Registries provides a standard way to access business registries and share information ▪ JAX-RPC – Java API for XML-based RPC sends SOAP method calls to remote parties over the Internet and receives the results 24 The JAX Pack ▪ JAXP – Processing plug in any compliant parser supports both SAX and DOM processing supports XSL and XSLT it is the foundation of any XML processing application ▪ JAXB – Binding provides a means of mapping XML documents to Java objects the JAXB complier generates Java classes based upon a schema (or DTD) these classes contain all the code necessary to parse and manipulate XML documents that conform to the schema 25 The JAX Pack ▪ JAXM – Messaging a standard, XML-centric, means of sending messages over the Internet from the Java platform based on SOAP 1.1 and SOAP with attachments specs requires a messaging provider implement the API ▪ JAXR – Registries provides a uniform way of accessing business registries over the Internet from the Java platform the API abstracts Java developers from the low-level details of UDDI or ebXML’s registry service ▪ JAX-RPC – XML-based RPC allows Java developers to write pure Java code devoid of XML and still access XML-based web services 26 Outline What is a web service? Why should we care about Web Services? How do Web Services and Java fit together? What is WSDL and how does it work? What is WSDL and how does it work? What is UDDI and how does it work? 27 WSDL ▪ Web Services Description Language (WSDL) 1.1 draft specification released March 15, 2001 by Ariba, IBM, and Microsoft an XML-formatted language that defines the ways you can contact a web service and describes the message formats you should use ▪ WSDL is essentially the IDL of web services makes a neutral declaration of the existence of one or more services describes the way a client can interact with those services 28 WSDL Elements ▪ A WSDL service definition applies several layers of abstraction ▪ There are six layers: data types that the service operates on message types the service can receive/send how these messages combine into operations what protocols the service will bind to WSDL ports (operation + protocol) a service on a given port 29 WSDL Elements 30 WSDL Elements (1) 31 31 WSDL Elements(2) 32 32 WSDL Elements(3) 33 33 WSDL Elements(4) 34 34 Outline What is a web service? Why should we care about Web Services? How do Web Services and Java fit together? What is WSDL and how does it work? What is UDDI and how does it work? What is UDDI and how does it work? 35 UDDI ▪ Universal Description, Discovery, and Integration 1.0 draft specification released Sept 6, 2000 by Ariba, IBM, and Microsoft partnership among industry and business leaders – almost 100 companies have signed up to support the UDDI.org project ▪ UDDI serves as three things: Service Provider o provides and publishes e-business web services Service Registry o a SOAP-activated web service yellow pages Service Requester o finds required services and binds client to those services 36 Locating a Service ▪ How do you currently find businesses and/or services on the web? type in the address(URL) directly use a search engine ▪ Web Services work the same way type in the address(URL) directly query a UDDI registry (a search engine for web services) 37 Invoking a Web Service ▪ Invocation process Client queries a UDDI registry node Server returns a list of records matching request Client identifies a specific service of interest Server binds client to the service so client can invoke service methods 38 UDDI Elements ▪ There are three core UDDI elements Business Services o a collection of web services that constitute a logical service grouping (“purchasing”, “tech support”) o two essential attributes: businessKey & serviceKey Binding Templates o describes location of web service and how to access o provides information on protocol and access to interface definition (WSDL) or other API Tmodels o descriptive information about data type ✓ type of business, type of service, interface type used 39 Review ▪ Web Services Overview definition o loosely coupled, coarse-grained, asynchronous o modular, self-contained, self-describing o published, located, invoked across the web types o component wrapper o B2B facilitator o componentized e-service o dynamic business enabler 40 Review ▪ Web Services Industry Players o Microsoft’s.NET – device integration o IBM’s Dynamic e-business – flexibility o Sun’s ONE – extensible, integrateable o Mind Electric’s Glue – RAD SOAP tool o Apache SOAP and Axis – open source SOAP Future for Web Services? YES!!! 41 Review ▪ Sun’s JAX Pack JAXP – foundation for XML processing JAXB – generates XML processing classes JAXM – uniform messaging from Java platform based on SOAP 1.1 JAXR – uniform access to registry services like UDDI or ebXML’s registry service JAX-RPC – lazy web services (no-XML experience necessary) 42 Review ▪ WSDL the IDL of web services makes a neutral declaration of the existence of one or more services describes the way a client can interact with those services ▪ UDDI the yellow pages of Web Services Service Provider – provides and publishes services Service Registry – a SOAP-activated directory Service Requester – finds required services and binds client to those services 43