1 / 27

Distributing Modular Applications: Introduction to Web Services

Understand the technology, standards, and advantages of web services, distinguish RPC and document styles, and learn about SOAP, WSDL, and UDDI. Explore how web services work and their benefits in distributed applications.

baine
Download Presentation

Distributing Modular Applications: Introduction to Web Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Distributing Modular Applications: Introduction to Web Services

  2. Objectives • After completing this lesson, you should be able to do the following: • Describe the Web services technology • Identify the standards used by Web services • Identify the benefits of Web services • Distinguish between remote procedure call (RPC)-style and document-style Web services • Discuss the role of Simple Object Access Protocol (SOAP), Web Services Description Language (WSDL), and Universal Description, Discovery, and Integration (UDDI) in Web services

  3. What Is a Web Service? Businesslogic Web presentation HTML HTTP client XML Web service Databases External applications Application Server

  4. Web Service A Web service is: • A software component whose technology is based on a set of standards for building interoperable distributed applications • A set of self-describing business functions • Service oriented • Component based

  5. Service-Oriented Architecture Serviceregistry Publish Find Service provider Servicerequestor Invoke

  6. Web Services Constituents • Internet for communication • XML as universal data format • SOAP for XML messaging • WSDL for describing the service • UDDI for publishing the Web services

  7. Benefits of Web Services • Distributed component model with interoperability • XML format for representing data. The request and response messages are in the XML format. • Programming language independent • Easily accessible with standard protocols such as HTTP, HTTPS, SMTP, and FTP • Communication through firewalls • Existing components can be exposed as Web services to save development time. • Different communication styles: • RPC style (synchronous) • Message style (asynchronous)

  8. Web Services Model Client application 2 Find XML interface (WSDL) Web servicesdirectory (UDDI) 3 1 Invoke Publish XML interface (WSDL) Web service

  9. RPC-Style Web Services • RPC-style Web services are loosely coupled. • SOAP messages model the call and response semantics. • This style of communication can be described in WSDL.

  10. Document-Style Web Services • Document-style Web services are loosely coupled. • SOAP messages carry arbitrary XML documents. • This style of communication can be described in WSDL.

  11. Oracle Support for Web Services • Oracle Application Server 10g is the infrastructure for: • Describing Web services • Deploying Web services • Publishing Web services • Invoking Webservices • OracleJDeveloper 10gprovides tools for: • Developing, deploying, publishing, and invoking Web services • Modeling, testing, and debugging Web services • Browsing UDDI registry to locate Web services • Generating stub files to consume Web services

  12. SOAP: XML Messaging for Web Services • Introduces a self-describing data representation format in XML • Represents request and response as XML messages • Supports both RPC-style and document-style invocation • Uses HTTP and other protocols at transport layer • Supports data encoding and literal styles • SOAP hides details of implementations; works with: • Any programming language • Any operating system • Any hardware platform

  13. Communication with SOAP • Communication by using SOAP protocol includes: • Requests to invoke a service • Responses from service method • Fault from a service Request Response Firewall SOAP client Web server

  14. SOAP Messages HTTP headers • A SOAP message is an XML document that consists of: • A mandatory envelope as a top-level element • An optional header • A mandatory body • An optional fault SOAP envelope SOAP header Headers SOAP body Message name, data,and fault element

  15. Web Services DescriptionLanguage (WSDL) • Is a description language to define Web service interfaces and how to invoke them • Is an XML Schema for describing Web services: • Service interface definition: Describes what message must be sent and what message is returned • Service implementation definition: Describes to which address the message must be sent • Allows both the messages and the operations on the messages to be defined abstractly in XML • Answers three key questions about a Web service: • What does a service do? • How is a service accessed? • Where is a service located?

  16. <?xml version=“1.0” encoding=“UTF-8” ?> <definitions name=“Hello” ... targetNamespace=“http://tempuri.org/Hello.wsdl” ...><types> <schema targetNamespace=“http://tempuri.org/Hello.xsd ... xmlns:xsd=“http://www.w3.org/2001/XMLSchema” /></types> <message name=“sayHelloOutput”>... </message> <message name=“sayHelloInput”> ... </message> <portType name=“HelloPortType> <operation name=“sayHello”> .... </operation> </portType> <binding name=“HelloBinding”> <operation> <input>..</input> <output>..</output> </operation> </binding><service ..> <port> <soap:address location=“..” /> </port></service></definitions> WSDL

  17. UDDI Registry • Is an online electronic registry for registering businesses and Web services • Is a specification for description and discovery • Supports the Publishing and Inquiry APIs to publish and inquire about a Web service

  18. How UDDI Is Used Business portals and marketplaces UDDI Business Registry UDDI Registry Businessdescriptions Servicetypes Business user Software developer

  19. Searching for a Web Service by Using UDDI Information about business modelTechnical details of provided serviceInformation on business process Provider infoContact InfoDirectory ofnames Search using context such as location, service type. Point to White pages for details. White pages Yellow pages Green pages

  20. UDDI Specification • UDDI Programmer’s API • UDDI Data Structure Specification and XML Schema • UDDI Replication Specification and UDDI XML Replication Schema • UDDI Operator’s Specification

  21. tModel • Provides metadata information about a Web service specification • Contains references to the specification locations • Is used for compliance check

  22. tModel <tModel tModelKey="uuid:7716711A-1231-483F-A4B9-36104341BA78" operator=“…” authorizedName=“…”> <name>Airport Weather</name> <description xml:lang="en"> Web Service to check weather on intl. airports </description> <overviewDoc> <description … >…</description> <overviewURL> http://live.capescience.com/wsdl/AirportWeather.wsdl </overviewURL> </overviewDoc> ... </tModel>

  23. UDDI Support in Oracle JDeveloper 10g • JDeveloper provides a UDDI browser with which you can: • Define a connection to a UDDI registry instance • Search for services: • Look up tModel by name or category • Locate a service implementing this tModel • Add a business providing this service to the UDDI browser • For the located service: • Generate Web service stub/skeleton • View WSDL • View a business that provides the service

  24. UDDI Browsing with Oracle JDeveloper 10g

  25. UDDI Publishing and Browsing with Oracle Enterprise Manager • Using Oracle Enterprise Manager Application Server Control, you can: • Browse and register services within the UDDI registry • Publish Web services and deploy them to a J2EE container • Monitor and administer Web services

  26. Summary • In this lesson, you should have learned how to: • Provide an overview of Web services technology • Identify the standards used by Web services • Identify the benefits of Web services • Locate and invoke Web services by using SOAP, WSDL, and UDDI • Distinguish between RPC-style and Document-style Web service

  27. Practice 18-1: Overview • This practice covers revision questions on Web services technology and standards such as SOAP, WSDL, and UDDI.

More Related