1 / 21

Introduction to Web Services

Introduction to Web Services. Presented by Sarath Chandra Dorbala. Outline. Definitions Basic Standards SOAP WSDL UDDI. Definitions.

Télécharger la présentation

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. Introduction to Web Services Presented by Sarath Chandra Dorbala

  2. Outline • Definitions • Basic Standards • SOAP • WSDL • UDDI

  3. Definitions • A Web Service is a software component that is described via WSDL and is capable of being accessed via standard network protocols such as but not limited to SOAP over HTTP.www.oasis-open.org/committees/wsia/glossary/wsia-draft-glossary-03.htm • The W3C defines a Web service as a software system designed to support interoperable Machine to Machine interaction over a network. http://en.wikipedia.org/wiki/Web_service • An Internet hosted application controlled through SOAP requests which returns results as SOAP responses. http://www.gateway2sms.com/glossary.asp

  4. Basic Standards • XML • All web service documents are written in XML • XML Schemas are used to define elements used in Web Service communication • SOAP • Communication is done over SOAP (typically) • Request and responses messages are encoded in SOAP • The body of the message is contained with in SOAP envelope • Binds the client to the web service

  5. WSDL • Describes the web service and defines functions that are exposed in the web service • Defines SOAP message format • UDDI • UDDI is used to register and look up services with a central registry • Service Providers can publish information about their business and the services that they offer • Service consumers can look up services that are available by • Business • Service category • Specific service

  6. SOAP • Stands for Simple Object Access Protocol • It is a platform independent, XML bases communication protocol for message exchanging between applications

  7. Elements of SOAP message • SOAP is a XML document with the following elements • Envelope • Used to identify the SOAP message • Header (Optional) • This element contains header. For this course this part is important for incorporating security into web services • Body • This element contains call and response information • Fault (Optional) • This element contains details about processing errors

  8. Skeleton SOAP Message <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Header> ... ... </soap:Header> <soap:Body> ... ... <soap:Fault> ... ... </soap:Fault> </soap:Body> </soap:Envelope>

  9. Sample SOAP Message SOAP Request POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPrice> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope>

  10. SOAP Response HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPriceResponse> <m:Price>34.5</m:Price> </m:GetStockPriceResponse> </soap:Body> </soap:Envelope>

  11. WSDL • WSDL stands for Web Service Description Language • It is an XML Document that describes a web service • It specifies the location of the service and operations it exposes

  12. Elements of WSDL • <portType> • It describes a web service, the operations that can be performed, and the messages that are involved. • <message> • Defines the data elements of an operation. Eg, Parameters to the function call parameters • <types> • Defines the data types used by the web service • <binding> • Defines the message format and protocol bindings for each port

  13. Skeleton WSDL Document <definitions> <types> definition of types........ </types> <message> definition of a message.... </message> <portType> definition of a port....... </portType> <binding> definition of a binding.... </binding> </definitions>

  14. WSDL Binding to SOAP

  15. UDDI • UDDI stands for Universal Description, Discovery and Integration • UDDI is a platform-independent framework for describing services, discovering businesses, and integrating business services by using the Internet.

  16. Advantages of UDDI • Finding the right business from millions • Defines how to enable e-commerce once business is found • Describing services and business processes programmatically in a single, open and secure environment.

  17. Basic Mechanism

  18. Conclusions • We have seen the essential components of a Web Service. • We have seen the brief overview of these components that form the building blocks of a web service

  19. Recommendations • Examine the real WSDL documents and realize its components • Here is a sample WSDL http://cs.odu.edu/~sdorbala/wsdl/joft.wsdl • Tutorials for creating web services both in .NET and in Java are available http://cs.odu.edu/~sdorbala/ws/JavawebInstr.pdf http://cs.odu.edu/~sdorbala/ws/instructions_net2003.pdf

  20. References • http://wikipedia.org/wiki/Web_service • http://w3schools.com

  21. Questions

More Related