Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Services Darshan R. Kapadia Gregor von Laszewski 1

Similar presentations

Presentation on theme: "Web Services Darshan R. Kapadia Gregor von Laszewski 1"— Presentation transcript:

1 Web Services Darshan R. Kapadia Gregor von Laszewski 1

2 What are Web Services? A Web service (also Web Service) is defined by the W3C as "a software system designed to support interoperable machine-to-machine interaction over a network". Web Services can convert your application into a Web-application, which can publish its function or message to the rest of the world. http://grid.rit.edu2

3 What are Web Services? Web services are application components Web services communicate using open protocols Web services are self-contained and self- describing Web services can be discovered using UDDI(Universal Description, Discovery and Integration) Web services can be used by other applications XML is the basis for Web services http://grid.rit.edu3

4 Interoperability has Highest Priority!! When all major platforms could access the Web using Web browsers, different platforms could interact. For these platforms to work together, Web-applications were developed. Web-applications are simple applications that run on the web. These are built around the Web browser standards and can be used by any browser on any platform. By using Web services, your application can publish its function or message to the rest of the world. Web services use XML to code and to decode data, and SOAP to transport it (using open protocols). http://grid.rit.edu4

5 Elements of Web Services The basic Web services platform is XML + HTTP. XML provides a language which can be used between different platforms and programming languages and still express complex messages and functions. The HTTP protocol is the most used Internet protocol. Web services platform elements: – SOAP (Simple Object Access Protocol) – UDDI (Universal Description, Discovery and Integration) – WSDL (Web Services Description Language) http://grid.rit.edu5

6 What is SOAP? SOAP stands for Simple Object Access Protocol SOAP is an XML-based protocol to let applications exchange information over HTTP. SOAP is a protocol for accessing a Web Service. SOAP is a communication protocol SOAP is a format for sending messages SOAP is designed to communicate via Internet SOAP is platform independent SOAP is language independent SOAP is based on XML

7 What is WSDL? WSDL stands for Web Services Description Language WSDL is an XML-based language for locating and describing Web services. WSDL is based on XML WSDL is used to describe Web services WSDL is used to locate Web services http://grid.rit.edu7

8 What is UDDI? UDDI stands for Universal Description, Discovery and Integration UDDI is a directory service where companies can register and search for Web services. UDDI is a directory for storing information about web services UDDI is a directory of web service interfaces described by WSDL UDDI communicates via SOAP UDDI is built into the Microsoft.NET platform

9 Example of Web Service

10 WHY SOAP? Today's applications communicate using Remote Procedure Calls (RPC) between objects like DCOM and CORBA, but HTTP was not designed for this. RPC represents a compatibility and security problem; firewalls and proxy servers will normally block this kind of traffic. A better way to communicate between applications is over HTTP, because HTTP is supported by all Internet browsers and servers. SOAP was created to accomplish this. SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages. http://grid.rit.edu10

11 SOAP Building Blocks A SOAP message is an ordinary XML document containing the following elements: – An Envelope element that identifies the XML document as a SOAP message – A Header element that contains header information – A Body element that contains call and response information – A Fault element containing errors and status information

12 Skeleton SOAP Message.........

13 The SOAP Envelope Element The SOAP Envelope element is the root element of a SOAP message. The required SOAP Envelope element is the root element of a SOAP message. This element defines the XML document as a SOAP message. http://grid.rit.edu13... Message information goes here...

14 The SOAP Header Element The SOAP Header element contains header information. The optional SOAP Header element contains application-specific information (like authentication, payment, etc) about the SOAP message. If the Header element is present, it must be the first child element of the Envelope element. http://grid.rit.edu14

15 The SOAP Body Element The required SOAP Body element contains the actual SOAP message intended for the ultimate endpoint of the message. Apples

16 The SOAP Fault Element The SOAP Fault element hold errors and status information for a SOAP message. The optional SOAP Fault element is used to indicate error messages. If a Fault element is present, it must appear as a child element of the Body element. A Fault element can only appear once in a SOAP message. http://grid.rit.edu16

17 The SOAP Fault Element-Sub Elements Sub Element Description A code for identifying the fault A human readable explanation of the fault Information about who caused the fault to happen Holds application specific error information related to the Body element http://grid.rit.edu17

18 Example of SOAP

19 WSDL WSDL stands for Web Services Description Language. WSDL is an XML-based language for describing Web services and how to access them. WSDL is a document written in XML. The document describes a Web service. It specifies the location of the service and the operations (or methods) the service exposes. http://grid.rit.edu19

20 WSDL Document definition of types........ definition of a message.... definition of a port....... definition of a binding.... http://grid.rit.edu20

21 WSDL Ports The element is the most important WSDL element. It describes a web service, the operations that can be performed, and the messages that are involved. The element can be compared to a function library (or a module, or a class) in a traditional programming language. http://grid.rit.edu21

22 WSDL Bindings The element defines the message format and protocol details for each port. The binding element has two attributes - name and type. The name attribute (you can use any name you want) defines the name of the binding, and the type attribute points to the port for the binding. The soap:binding element has two attributes - style and transport. The style attribute can be "rpc" or "document". In this case we use document. The transport attribute defines the SOAP protocol to use. In this case we use HTTP. The operation element defines each operation that the port exposes. For each operation the corresponding SOAP action has to be defined. You must also specify how the input and output are encoded. In this case we use "literal". http://grid.rit.edu22

23 WSDL Example http://grid.rit.edu23

24 DEMO http://grid.rit.edu24

25 References us/default.aspx http://grid.rit.edu25

Download ppt "Web Services Darshan R. Kapadia Gregor von Laszewski 1"

Similar presentations

Ads by Google