T3TWS1.Introduction to SOA-R15
Short Description
T3TWS1.Introduction to SOA-R15...
Description
SOA – SOA – Basic Concepts
TEMENOS EDUCATION CENTRE Warning Warni ng:: Thi This s do docu cumen ment, t, is pr prot otec ecte ted d by co copy pyrig right ht la law w an and d in inte tern rnat atio iona nall tre treat atie ies. s. No pa part rt of th this is do docu cume ment nt m ay ay be reproduced or transm ititted in any form or by any means, electronic or m ec echanical, for any purp pu rpos ose, e, wi with thou outt th the e ex expr pres ess s wri ritt tten en per ermi miss ssiion of TE TEME MENO NOS S HE HEAD ADQ QUA UART RTE ERS SA Un Una aut utho hori rize zed d repr re prod oduc ucti tion on or di dist stri ribu buti tion on of th this is pr pres esen enta tati tion on or an any y po port rtio ion n of it it,, ma may y re resu sult lt in se seve vere re ci civi vill an and d cr crim imin inal al pena pe nalt ltie ies, s, an and d wi will ll be pr pros osec ecut uted ed to th the e ma maxi ximu mum m ex exte tent nt po possi ssibl ble e un unde derr ap appl plic icab able le la law. w.”” Info Informa rmatio tion n in thi this s docum do cumen entt is su subj bjec ectt to ch chan ange ge wi with thou outt no noti tice ce
Objectives
At the end of this session you will be able to
Describe the need for SOA
Name the technologies used to create a web service
Create and consume a simple webservice
Objectives
At the end of this session you will be able to
Describe the need for SOA
Name the technologies used to create a web service
Create and consume a simple webservice
What is SOA?
SOA
SOA
Service Oriented Architecture
SOA is a way of software development based on well defined services
“Service Oriented Architecture is a paradigm for organising and utilising distributed capabilities that may be under the control of different ownership domains. It provides a uniform means to offer, discover, interact with and use capabilities to produce desired effectives consistent with measureable preconditions and expectations.” (OASIS)
Services Postal Services
Transport Services
Housekeeping Services
Example
Internet Store Book orders Payment
SOA key features
SOA Services
Interoperability
Loose coupling
Service Architecture 1
Service request
Provider
Consumer Service response
Service Architecture 2
Registry
Find
Register
Consumer Bind and Invoke
Provider
SOA and technology
Resources are made available as independent services
Service may be accessed without knowledge of their underlying platform implementation
Implemented using a wide range of technologies, including REST, RPC, DCOM, RMI, CORBA, WCF or Web Services
REST – Representational State Transfer RPC – Remote Procedure Calls DCOM – Distributed Component Object Model – Remote Method Invocation RMI CORBA – Component Object Request Broker Architecture WCF – Windows Communication Foundation Web Services – Also called XML Web Services to differentiate from REST web services
Webservices
WEBSERVICES
What is a Webservice? Formal Definition
A software system designed to support interoperable Machine to Machine interaction over a network (W3C)
The term Web services describes a standardized way of integrating Web-based applications using XML based open standards over an Internet protocol backbone (from webopedia.com)
Services are what you connect together using Web Services
Web Services refers to the technologies that allow for making connections
Web Service also can be explained as a method on a system that can be invoked remotely from another system (consumer) using web technologies
A simpler definition
Web services are not necessarily use by humans.
Why? They normally do not have a visual interface
Web services are a standard way for computers on the internet to publish access to program functions that they want to allow other computers to use.
That is a web service must be invoked like a function in a computer program.
Lets write a webservice (java) package com.temenos.calc; import javax.jws.WebService; import javax.jws.WebMethod; import javax.jws.WebParam; @WebService public class FirstService { (action=“Add") @WebMethod
public int Add(int a, int b) throws AddNumbersException { if (a < 0 || b < 0) { throw new AddNumbersException( "Negative number cant be added!", "Numbers: " + a+ ", " + b); } return a + b; } }
A webservice
A webservice has methods (functions) which may called over the web The sample webservice
is called FirstService
has one method called “Add”
But web services are meant to be called by software…
Web services are meant to be called by other software
But , how do other software call a webservice?
Calling a webservice
To call a webservice, you need to know
It’s
It’s interface:
The transport protocol : what protocol does the service understand?
The message protocol: what format does the message follow?
location: where is the service located? it’s methods, method signatures, and return values
Web Services described
XML Web service is a software service exposed on the Web through SOAP, described with a WSDL file and registered in UDDI.
Web Services Building Blocks
Discovery
UDDI, DISCO Description
WSDL Message Format
SOAP
Encoding XML, schemas Transport HTTP, SMTP, …
WSDL
SOAP?
Before we start…. Let us be clear on what is meant by
XML Xtensible Markup Language. May be used to describe whatever you want.
You attach meanings to the tags.
DTD or Schema Document Type Definition. To describe to others what tags are allowed in our
particular XML document, and in what structure we would expect to find them. i.e. they are mechanisms for validating the XML.
Schema and SOAP Simple Object Access Protocol. It is a specific format of XML.
Schema and WSDL Web Services Description Language. It is a specific format of XML.
WSDL
A WSDL service description is the XML grammar and vocabulary to describe a Web service. W3 definition
“WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information. The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint. Related concrete endpoints are combined into abstract endpoints (services). “
WSDL
If you type the URL of a webservice followed by ?wsdl you would get something like this
SOAP
SOAP?
What can we do with SOAP?
Exchange messages
SOAP is a specification that defines the XML format for messages
Defines an XML structure
to call a method on a remote machine and pass arguments
To return values
To return error messages (if any)
What can we do with SOAP?
What makes up SOAP ?
Envelope package
Header/Body pattern
Similar to how HTTP works
Header Body Payload
Simple Example 345 3 4
c = Add(a, b)
SOAP Elements
Envelope (mandatory)
Top element of the XML document representing the message
Header (optional)
Determines how a recipient of a SOAP message should process the message
Adds features to the SOAP message such as authentication, transaction management, payment, message routes, Security digest etc…
SOAP elements …
Body (mandatory)
Exchanges information intended for the recipient of the message.
Typical use is for RPC calls and error reporting.
Quiz
Description The ability of diverse systems to work together Degree to which software pieces depend on each other I am used to describe web services I am used to describe meanings for XML tags I am used a protocol for exchanging structured information
Name it
Quiz – State True or False
Web services are the only way to implement a SOA
http is the only transport protocol used by SOAP
SOAP is an XML format
Important Points
SOA is a way of software development based on well defined services A service typically exposes a single, discrete business process Services may be implemented using different technologies
Webservices has made it popular
Webservice uses XML standards
SOAP
WSDL
References - Books
SOA in Practice (Nicolai Josuttis)
Java Webservices
View more...
Comments