Lecture 6 ICT 723 - Split
Lecture 6 ICT 723 - Split
CRICOS 03171A 1
This Week….
• Web Services
Toward a Service Oriented Architecture
• Technologies leading to SOA
• Remote Procedure Calls
• Concepts
• Abstractions- business tasks
• Standards
Information as a Service
• Moving from a Project-Based to a Flexible Architecture (SOA)
The ‘Integration’ Challenge
1. Discovery
• – Where is the service?
2. Description
• – What service does it offer?
• – How do I use it?
3. Messaging
• – Let’s communicate
Web Services: Standard is Key
• WSDL is used to describe the function(s) that an application will
be calling documenting in a standard way its entry points,
parameters and output
• XML is used to carry the values of parameters and the outputs
of the function
• SOAP is used as the messaging protocol that carries content
(XML) over a network transport (typically HTTP)
• HTTP is used as the network transport layer
Web Services Interaction
Web Services Development and Deployment
• Tools should be used for development
• Ex: IBM Data Studio
• Runtimes are expected to run services
• Websphere Application Servers, Geronimo, etc.
• Apache Soap (based on IBM SOAP4J) with Xerces XML parser (also
contributed by IBM)
• Other tools
• WSDL generation, UDDI, etc.
WSDL: Web Service Description Language
• WSDL (Web Services Description Language) is a public
description of the interfaces offered by a web service.
Expressed in XML, it provides machine readable document that
provides a calling application all of the information required to
interact with a web service
WSDL Specification
• XML grammar
– <definitions>: root WSDL element
– <types>: data types transmitted (starts with XML Schema
specifications)
– <message>: messages transmitted
– <portType>: functions supported
– <binding>: specifics of transmissions
– <service>: how to access it
WSDL Example
<message name="getTermRequest">
<part name="term" type="xs:string"/>
</message>
<message name="getTermResponse">
<part name="value" type="xs:string"/>
</message>
<portType name="glossaryTerms">
<operation name="getTerm">
<input message="getTermRequest"/>
<output message="getTermResponse"/>
</operation>
</portType>
SOAP: A Description (Simple Object Access
Protocol)
• Industry standard message format for sending and receiving
data between a web services consumer and a web service
provider
• SOAP messages are XML documents which have an envelope
and:
• Header (optional): contains information about the message such as
date/time it was sent or security information
• Body: contains the message itself
• Standard messaging protocol maintained by the W3C XML
Protocol Working Group.
SOAP: A Description
SOAP: Skeleton <?xml version="1.0"?>
Message <soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-
envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/s
oap-encoding">
<soap:Header>
...
</soap:Header>
<soap:Body>
...
<soap:Fault>
...
</soap:Fault>
</soap:Body>
</soap:Envelope>
SOAP: Give it a REST
• REST: REpresentation State Transfer
• Restful: Follows the REST principles
• Not strictly for web services
• Term used loosely as a method of sending information
• over HTTP without using a messaging envelope
Web Service Invocation
• 1. A client may have no knowledge of what Web Service it is
going to invoke. So, our first step will be to find a Web Service
that meets our requirements. For example, we might be
interested in locating a public Web Service which can give me
the temperature in US cities. We'll do this by contacting a UDDI
registry.
• https://www.w3.org/TR/ws-arch/
• https://www.w3.org/TR/wsdl/
• https://www.w3.org/TR/soap/