WEB SERVICES
AGENDA
Situation
The world before
Problems
SERVICES
WEB
Solutions
The World Before Web Services
Situation System A
The world before
Problems
Org A
System B
System SERVICES A
WEB
Org B
Solutions
System C System B
The World Before Web Services
Problems
System A Situation
System SERVICES A Create bridge System B System A PLSystem C A Platform A System B PL B Platform B
Org SolutionA
Different types of platforms Different types of programming languages
The world before
Problems
WEB
Bridge
Org B
Solutions
System B
The World Before Web Services
Another Better Solutions
System A Situation
The world before
Org A
System B
System SERVICES A
WEB
Org B
Solutions Solutions
System C System B
AGENDA
Situation
The world before
Problems
SERVICES
Motiv. for Web Services
WEB
Solutions
Probs. with Curr. sols.
Web Services Solution
Problems with current solutions
Situation
Involve a whole learning curve
Not based on standardized rules and specifications
The world before
Problems
Module A
CORBA
Module B
SERVICES
Motiv. for Web Services
Module A
RMI
WEB
Solutions
CORBA
Probs. with Curr. sols.
CORBA
Module C
Module B
Web Services Solution
Web Services
Provide
Situation
The world Standardized method of communication between Problems before software applications
Distributed components are interfaced SERVICES via non-object-specific protocols Probs. with
Curr. sols.
WEB
Solutions
Module A C++
Motiv. for Web Services
Module Web Services B
Solution
Java
2012 Copyright Headstrong Genpact. All Rights Reserved.
Fundamentals of WSDL
WSDL
The world before
LEADING with Domain-Specific IT Solutions
Situation
Problems
SERVICES
Service Implementation
WEB
Types
Solutions
Message
Operation
Fund. Of Web Services
Motiv. for Web Services +ve and -ve of Web Services Web Service Interface
(WSDL)
Port Type
Binding Port Service
Probs. with Curr. sols.
Web Services Solution
What is a Web Service
11
A web service is a piece of business logic, located somewhere on the Internet, that is accessible through standard-based Internet protocols such as HTTP or SMTP. OR A web service is just a web page meant for a computer to request and process.
Copyright 2012 Headstrong
Confidential and Proprietary Information
| www.headstrong.com
Charaterstics of a Web Service
XML-based information exchange systems that is useful for direct applicationto-application interaction. With Web services you can exchange data between different applications and different platforms. Interoperability among distributed applications that span diverse hardware and software platforms Use of Standard protocols and specification enables integration with Other Messaging Systems, Legacy Systems, etc. Seamless Integration of B2B applications Loosly Coupled
Copyright 2012 Headstrong
Confidential and Proprietary Information
| www.headstrong.com
Components of a Web Service
WSDL-Web Service Description Language SOAP-Simple Object Access Protocol UDDI- Universal Description, Discovery and Integration (UDDI)
13
SOAP Message Protocol SOAP provides a simple and lightweight mechanism for exchanging structured and typed information between peers in a decentralized, distributed environment using XML WSDL Service Description Web Services Description Language (WSDL) is an XML format for describing Web services. WSDL enables one to separate the description of the abstract functionality offered by a service from concrete details of a service description such as "how" and "where" that functionality is offered. UDDI Service Registry The Universal Description, Discovery and Integration (UDDI) specification defines a standard way to describe a Web service; register a Web service in a well-known registry; and discover other registered Web services.
Copyright 2012 Headstrong
Confidential and Proprietary Information
| www.headstrong.com
WSDL
14
WSDL architecture
Web Services Description Language (WSDL) files are written in Extensible Markup Language (XML). WSDL is one alternative to make service interfaces and implementations available in the UDDI registry. WSDL includes the workflow description (business process execution language for Web services, BPEL4WS) WSDL is the base for SOAP server deployment and SOAP client generation.
The following is the structure of the information in a WSDL file : A WSDL file
A WSDL file contains the following parts:
Web service interface definition
This is part contains the elements, as well as the namespaces.
Web service implementation
This part contains the definition of the service and ports.
2012 Copyright Headstrong Genpact. All Rights Reserved.
WSDL-Components
WSDL Layers:1.Service definition layer describes abstract properties: -Data types -Message types -Operations -Services 2. The binding layer describes concrete properties: -Protocols -Data formats (using SOAP, HTTP, MIME) Components:types - containing XML Schema element and type definitions
15
message - consisting of either ?a number of named parts typed by XML Schema elements, or a single part typed by a XML Schema type
portType - describing a set of operations, each being either ?one-way: receiving an input message, request-response: receiving an input message and then responding with an output message (like Remote Procedure Calls), solicit-response: sending an output message and then receiving an input message, or notification: sending an output message binding - selects communication protocol and data formats for each operation and message service - describes a collection of named ports, each associated with a binding and a network address An import mechanism allows modularization of definitions.
Copyright 2012 Headstrong
Confidential and Proprietary Information
| www.headstrong.com
WSDL Components Contd..
16
The services and ports define the location of the Web service Service The service contains the Web service name and a list of ports. Ports The ports contain the location of the Web service and the binding used for service access.
<service name="EightBall">
<port binding="ebs:EightBallBinding" name="EightBallPort"> <soap:address location="localhost:8080/axis/EightBall"/> </port>
</service>
Copyright 2012 Headstrong
Confidential and Proprietary Information
| www.headstrong.com
Creation of Web service using Eclipse
1. Create a Dynamic Web Project 2.Create Web Service Provider Java Class 3. Create a Web Service
17
4. Test Web Service
Copyright 2012 Headstrong
Confidential and Proprietary Information
| www.headstrong.com
18
Copyright 2012 Headstrong
Confidential and Proprietary Information
| www.headstrong.com
19
Copyright 2012 Headstrong
Confidential and Proprietary Information
| www.headstrong.com
20
Copyright 2012 Headstrong
Confidential and Proprietary Information
| www.headstrong.com
Creation of Web service using Eclipse
1. Create a Dynamic Web Project 2.Create Web Service Provider Java Class 3. Create a Web Service
21
4. Test Web Service
Copyright 2012 Headstrong
Confidential and Proprietary Information
| www.headstrong.com
22
Copyright 2012 Headstrong
Confidential and Proprietary Information
| www.headstrong.com
23
Copyright 2012 Headstrong
Confidential and Proprietary Information
| www.headstrong.com
24
Copyright 2012 Headstrong
Confidential and Proprietary Information
| www.headstrong.com
25
Copyright 2012 Headstrong
Confidential and Proprietary Information
| www.headstrong.com
26
Thank You!
Q&A
Copyright 2012 Headstrong Confidential and Proprietary Information | www.headstrong.com