Presentation is loading. Please wait.

Presentation is loading. Please wait.

McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Web Services Ellen Pearlman Eileen Mullin Programming the Web Using XML.

Similar presentations

Presentation on theme: "McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Web Services Ellen Pearlman Eileen Mullin Programming the Web Using XML."— Presentation transcript:

1 McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Web Services Ellen Pearlman Eileen Mullin Programming the Web Using XML

2 14-2 Learning Objectives 1.Understanding what Web Services are 2.Investigating SOAP and how it works as a wrapper for XML messages 3.Seeing how UDDI maintains a registry for business services 4.Looking at WSDL as a specific XML language to describe business services and the message groups it uses 5.Viewing a simple Web Services Model: “publish, find and bind” 6.Looking at the way SOAP sends and receives messages 7.Examining the way WSDL structures a statement

3 14-3 What Are Web Services? Web Services are a group of services and technologies working together to ensure seamless information exchange and delivery. Web Services reside on a Web server and organizations and individuals who provider these services are known as application service providers. These services can perform functions ranging from monitoring bids on auction items to managing customer relation management (CRM) software.

4 14-4 What Are Web Services? (2) Although Web services do reside on specific servers, they can also be accessed through a peer-to-peer arrangement. Before there were Web Services, EDI (Electronic Data Interchange) was used to handle a very complex relationship of procedures and data that was proprietary and usually owned by a specific company.

5 14-5 Semantic Web The inventor of the Web, Tim Berners-Lee, put forth the idea of the Semantic Web, or a Web that presented itself the same way that people spoke. Web Services are innately setup to work with the Semantic Web, which works with real-world objects linking data to programs. The Semantic Web itself doesn't follow a physical document, but models itself after real things in the world by using XML.

6 14-6 An Overview of Web Services

7 14-7 What Comprises Web Services The core of Web Services always uses XML. Web Services consists of: –XML –SOAP –UDDI –WSDL –XSD

8 14-8 SOAP SOAP (Simple Object Access Protocol), is a wrapper for XML messages. SOAP allows a program that functions under one type of operating system to communicate with another system, using HTTP (and other protocols) over the Internet. Since SOAP is a high-level protocol, it is independent of what lies underneath it, so it can work over HTTP, IMS (Instant Messaging Service), or simple mail transport protocols.

9 14-9 UDDI UDDI, (Universal Description, Discovery and Integration) is a registry of XML- enabled business worldwide. Businesses and services can list by either the type of Web Service they offer, their product, name or location.

10 14-10 WSDL WSDL (Web Services Description Language) is at the core of UDDI. WSDL is an XML language that describes what kind of services a business might offer, how it is able to communicate, how other businesses and individuals can use those services, and where the services reside on the network. It does this by describing endpoints on SOAP messages that give either document or procedural instructions.

11 14-11 Groups in WDSL WDSL actually breaks messages into groups. These basic groups are conveyed in the specific order of: –Import –Types –Message –PortType –Binding –Service

12 14-12 XSD XSD (XML Schema Definition) enables institutions, organizations and businesses to transfer elements, attributes, values, data types, structure and standards. XSD is also used as a basis for Web Services.

13 14-13 A Representation of the Flow of Web Services Structures

14 14-14 A Simple Web Services Model A Web Service initiates when the client or the client application asks for information about something, like a service, or a piece of data. The server that is hosting the Web Service processes and then invokes the Web service from this request by searching for it on the Web Services registry. When the appropriate Web Service is located, it is sent back to the client application.

15 14-15 A Representation of the Flow of Web Services Structures

16 14-16 A Little Bit of SOAP The SOAP protocol uses XML by encoding its text data and distributing it in a decentralized environment. The SOAP protocol does not mandate that a message be sent from requestor to server in a single “hop” and intermediaries can be used so the network can be truly virtual. Since the XML data is text, and is self describing, it is not terribly difficult to interpret.

17 14-17 A Simple SOAP Statement BreakingNews New 4U Every 10 Minutes

18 14-18 Identifying a Message by Giving the Header an ID Number uuid:Series200310-04........

19 14-19 A Sample Response to the Previous Request uuid:Series200310-04 uuid:Series200310-04-H1234........

20 14-20 Calling a Remote Procedure Sometimes a procedure needs to be called up that lives on a remote computer. When calling up the remote procedure, certain parameters must be passed to it using a “call” statement. This whole process is called RPC (Remote Call Procedure).

21 14-21 An RPC request message concerning foreign news headlines Today's Overseas Headlines

22 14-22 The RPC response message to the RPC request message It's A Sunny Day in Antarctica

23 14-23 Limitations The XML message in SOAP has to be extracted by an XML parser. –This makes the developer extremely responsible for making sure the extraction works and everything is coded properly. –If there are massive amounts of data to be exchanged, the performance won’t be optimal. Errors only show up in run time, not during the compiling stage, which is another drawback for programmers.

24 14-24 A Buy CD UDDI Provider

25 14-25 A buy CD UDDI provider description of HTTP accessible URLs

26 14-26 The Purpose of UDDI UDDI’s main purpose is to allow B2B and other commerce easy descriptive access of how they define their business, find other businesses and share information with each other. UDDI allows one to look up, for free both the Web Services of others and technical specifications of those services. This includes such simple information such as inventory, billing, marketing, management, and ordering.

27 14-27 The Site Provides Common Terminology for UDDI Groups

28 14-28 WSDL The current version of WSDL is WSDL 1.2, which became a W3C working draft in March 2003. Before that the standard was the WSDL Standard 1.1 written in March 2001. Both standards use an XML format and distinguish between what is referred to as the abstract functionality of the service and the pragmatic “how” and “where”.

29 14-29 WSDL’s Basic Operations There are four types of basic operations that WSDL uses. –One way: A message travels from one endpoint to another. –A notification operation: It is like one way, but with a notice. –A request-response. The client sends a request to the provider. The request is processed and sent back to the client. –Solicit-response: Though not commonly used in Web Services, it sends a message to the client and gets a message back.

30 14-30 In order to construct an actual Web Service, it is necessary to use a third party application, like the Microsoft SOAP Toolkit, Visual Studio.Net or IBM Websphere with its own Web Services toolkit. It also helps to know ASP.NET or Java as well as C++.

31 14-31 The End

Download ppt "McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Web Services Ellen Pearlman Eileen Mullin Programming the Web Using XML."

Similar presentations

Ads by Google