SOA Architecture
What is Middleware?
nA software that helps disparate and
distributed applications to collaborate with each other
nHelps leverage the best-of-breed products
nCompanies can get more ROI by being able to
reuse
nSOA is the hottest middleware strategy till date. Examples:
qBPEL, OSB
What is SOA?
“Next big thing ??”,
you would wonder, “Can you
tell me more? What is SOA all about?”
What is Service-Orientated Architecture?
nNot a technology or product, more a design
approach
n
nSOA is an architectural style which helps in
building connected enterprise applications to provide solutions to business
problems. By following SOA, enterprise applications modules can be exposed as
web services which helps in easy integration and can be reused.
n
n“Services” are
qAtomic, do not depend on other services run beforehand
qTechnology and implementation neutral - J2EE, .NET, PL/SQL
qPublished in directories so that they can be discovered and
reused !
q
nAs an architectural style, SOA promotes loose coupling,
interoperability assembling of applications from existing processes
nFrom customer's perspective it's about integrating different systems to
helps IT deliver solutions that are flexible à Can adapt to changing
markets, increasing competitive pressures and evolving customer needs
n
nServices can exchange data using a common
platform (OSB) or can be orchestrated using declarative language (BPEL)
n
Architecture for Oracle Fusion ApplicationsWhat’s the Big Deal?
“Okay. SOA proposes an
application design consisting of weaving together of multiple services”, you would say, “But what’s so great about
this S-O-A?”
Why SOA
Makes Sense:
Technical Benefits
Technical Benefits
nBuilding business processes is faster and
cheaper:
qExisting services can more easily
be reused
qApps can expose their services in
a standard way
nApplications can be exposed more easily to
diverse clients:
qWindows clients, ASP.NET/JSP,
PL/SQL, Java etc.
nApplications can adapt to change
Why SOA
Makes Sense:
Business Benefits
Business Benefits
nBusiness people understand services
qSo IT people can talk with them more easily
nApplications or business processes might be
more easily outsourced
qBecause they’re well-defined and discrete
nSolutions are cheaper to build
qReuse = Reduce cost
qLoose coupling = Less impact for any change = Less time to
spend changing code due to requirement change
Proof ?
n“Well, this definitely sounds good … but can you show where
SOA has been applied in real world ?”
SOA Application Examples in the real world
nData/Apps Integration
qFile to DB (Inbound Interface)
qInformation syncing from Oracle EBS to Siebel, PeopleSoft to JDEdwards
nProcess Portal
qParallel data processing
qContent publishing
nWorkflow
qDocument Approval
qLeave Application
nModern Web Applications
qInternet Banking
qContract Management
qNew Employee Hire
nBusiness Process Management
qP2P, O2C
qMedicare Eligibility Determination and Enrollment
SOA Application Examples in the real world – Inbound Interface Design
nI want to transfer
data from legacy system that produces csv output to a database.
nUse
a file adapter to easily read a file.
You can also specify the frequency to poll for the file, file name
pattern, archive the file after reading and so on.
nWe
can validate
the data before inserting – verify all the fields conform to a xml schema
nWe
can enrich
the data before inserting.
nWe
can perform routing to
different locations - write rules to decide whether to insert the data or not,
or to insert in some other DB or create another file
SOA Application Examples in the real world – Information syncing
nI capture item
information in an Item Management System.
However, once the item is entered, this information needs to go to
Oracle EBS. Another division wants this
information delivered to them in their FTP site
nUse
Adapter to listen to
Item Management System’s Item table. Whenever a record is entered, the SOA
application is started and this data is sent to the specified location. If tomorrow, I want to send it to one more
system, I can do it with minimal effort
SOA Application Examples in the real world - Parallel Data Retrieval
nI want to invite bids
for RFQ sent to suppliers. Can I send
the RFQ to multiple suppliers in parallel, and then wait for each of the
responses
nUse parallel processing capabilities of BPEL. BPEL provides a construct called FlowN using which you can spawn as many parallel flows as required, on the fly!
SOA Application Examples in the real world – Document Approval
nOnce a PO is created,
it needs to be approved
nApproval
depends upon PO Amount. If amount is
greater than USD10,000, it needs 3 levels of approval else only 2 levels
nThe
approvers must be managers of the person submitting.
nIf
the approval is not obtained in 2 days, the issue should be escalated to next
manager
nAny
document that contains a line item belonging to IT category must be sent as an
FYI to the IT department
nIt
should be possible to utilize different voting schemes – first approver wins,
majority or consensus
nUse BPEL to orchestrate human task, business rules to achieve this.
SOA Application Examples in the real world - New Employee Hire
nFor a new joinee, we need to
nRaise request in access provisioning system for
email, VPN etc
nSend filled PDF form for AMEX card
nUpdate HR tables
nSend email to Sodexho team
nUse BPEL to bind these different system and come up with an
application. Identify things that can be
done in parallel.
SOA Application Examples in the real world – Order to Cash
nI want to develop O2C cycle. We have following requirements to be met
qOrders come from a web portal
qOrder data is stored in Oracle EBS
qCustomer credit rating information comes from bank
qCustomer Data accessible using an EJB
qPO Approval can be manual or automated.
qRFQ needs to be sent to various shipping companies and lowest
quote should be selected
qCustomer must be sent an email and SMS upon Order fulfillment
nUse BPEL to bind these different system and come up with an end-to-end
system.
Market Value
nMarket
value is directly proportional to the number of potential applications
nMarket
value is inversely proportional to number of professionals
nIn current times, its only your knowledge of new things that
can sail you through
nPaucity
of quality training
nWhich is good! Because
it means less competition
nIntegration
solutions
nVendor specific – TIBCO, JCAPS
nOpen standard – Oracle SOA
nWith
Oracle emerging as the leader in Apps, Oracle SOA has a secure future
“hmm…sounds interesting..
So, what do I need to know
technically?”
Pre-requisites
nTechnology wise
qBasic understanding of XML, XSL, XSD
qCore Java knowledge a plus
q
nExcellent career option for
qPeople familiar with Oracle Apps, Peoplesoft, Siebel
qJava, .NET developers
qWeb developers
qSun JCaps, TIBCO, EAI
Communication among systems
Communication among consumers and providers
or services typically happens in heterogeneous environments, with little or no
knowledge about the provider.
Services exchange information through
messages.
nWhen communication happens, the message
coming from one system can be different from the message expected by the other
system. We need a way to convert or transform the message from one to the other
nMessages can be received through any protocol
such as HTTP(s), JMS, File , and may require to be sent using same or different
protocol. So we need a way to transform from one protocol
to the other
nWe may require the same message to be sent or
routed to multiple targets.
nIn comes “Service Bus” – it can do routing,
message transformation, protocol transformation and more
OSB
OSB
analogy
Orchestration of Services
nOrchestration of services is required when
there is a requirement to combine existing services into new services.
nSolution should allow assembling a set of
discrete services into an end-to-end process relatively easily
(development-wise and conceptually).
nThere is a solution - BPEL
Business Process Execution Language BPEL
nBPEL:
qIs a technology to create a
program that can invoke web services
qIt presents a very intuitive
flow-chart type representation that can be easily understood and modified
nMore technically, it is a markup
language for composing a set of discrete services into an end-to-end process
flow
qBPEL Process is a web service,
hence has a WSDL document that describes its operation
qinvokes operations described in
interfaces in the WSDL of other services.
BPEL
Example – Internet Banking
Can services be created for
EVERY conceivable system in this world
Yes
How do I create a service out of a database ?
Use “Adapters”
Some of the Adapters Available for
Oracle SOA Suite…Oracle SOA Suite
nProvides
“components” for designing, deploying, and managing “composite applications”.
q“Composites”
enable you to easily assemble multiple technology components into one SOA
composite application
q“Components”
nBPEL
nOSB
nMediator
nHuman Workflow
nBusiness rules
nAdapters (FTP, DB, AQ, JMS, MQ, Apps, Siebel, PSFT…)
nBAM, ODI
Thank you
Web Services Concepts
Web Services Concepts
Objectives
nAfter completing this lesson, you should be
able to do the following:
qUnderstand power of web services
qUnderstand WSDL
qUnderstand SOAP
Introducing Web Services
nWeb services are:
qSelf-describing business
functions
qAccessible from any Web-connected
device using:
nMessaging Protocols – The
messaging protocols are standards-based and are platform independent. These enable one service to call another
one - SOAP over HTTP, JMS
nProgramming standards – The
underlying programming standards help create services that conform to a
predefined structure. This means it is
possible to figure out what the service does in a platform and language independent
way. - WSDL
nNetwork registration – The
services can be searched in a common way - UDDI
Web Services
Communication Flow
Web Services
Communication Flow Example
nTo understand how web services work, lets
take an example.
n
nScenario – A Citibank customer wants to pay
his Vodafone phone bill through the bank’s website.
n
nSolution
1.First, the Vodafone IT team would create a
service that allows one to pay their bills through a web service. This service may be implemented in any way
they please, using ADF, POJO, PL/SQL etc.
However, the service needs to expose its interface according to WSDL
specification
2.In order to facilitate clients to be able to
find this service, the Vodafone team publishes this WSDL to a web services
directory. The directory is capable of
storing different kind of information like the request and response messages,
version, publisher details, type of service etc. All this information is structured in a
standard way so that interested parties can search or discover them. This common format is the UDDI
3.Citibank IT team, which is developing their
website, and want to provide this service to their customer, finds the service
developed by Vodafone team. This
completes the setup.
4.When a customer chooses to pay his bill, the
required information is sent to the Vodafone Bill Payment web service. This communication is done using a SOAP
message. As SOAP can work over HTTP,
which is the most used protocol on the Internet, this invocation can utilize
the power of Internet
5.The Vodafone Bill Payment service
acknowledges success or failure of the transaction
●
nThe above example brings out the interplay
of:
nMessaging protocols - SOAP
nProgramming standards – Interface
based on WSDL standard
nNetwork registration –
Information stored as per UDDI standard
n
nNote: A Public Registry, while a
really cool concept, didn’t really take off as expected. However, the concept itself found takers at
organization level and typically an organization that takes its SOA seriously
will have a registry setup.
Describing a web service
Lets understand what
it takes to describe a web service. If
we can appreciate these, then understanding why WSDL looks like it does would
be that much simpler.
•Requirement 1: We need to tell
what is the location of this web service
•Requirement 2: We
need to tell what is the language the web service speaks
•Requirement 3: We need to tell
what functions or operations this
web service is providing
•Requirement 4: We need to tell
what input and output parameters the service takes
•Requirement 5: We need to tell the
datatype of these parameters
WSDL Enters….
nA
WSDL document is just a simple XML document.
nIt
contains set of definitions to describe a web service.
nWSDL
document fulfills all the above requirements
qRequirement
1 – Where is the service
hosted
n<service>
qRequirement
2 – What protocol to use to
talk to the service
n<binding>
qRequirement
3 – What are the operations
n<portType>
qRequirement
4 – What are the parameters
n<message>
qRequirement
5 – What is the datatype of the messages
n<type>
Introducing WSDL
nWSDL stands for Web Services Description
Language
nWSDL is written in XML
nWSDL is used to describe Web services
nWSDL is also used to locate Web services
WSDL is a W3C recommendation
WSDL Document Structure
WSDL Ports
nThe <portType> element is the most important WSDL element.
nIt describes a web service, the operations that can be performed, and the messages that are involved.
nThe <portType> element can be compared to a function library (or a module, or a class) in a traditional programming language
Operation
Types
One-way operation type
The operation can receive a message but will not return
a response
Request-response
operation type
The operation can receive a request and will return a
response
nNow, a web service operation can take only one parameter. But I want to pass multiple parameters……what do I need to do
WSDL
Messages
nThe <message>
element defines the data elements of an operation.
nEach message can consist of one or more
parts. The parts can be compared to the parameters of a function call in a
traditional programming language.
nI want to pass a complex object to my web service……what do I need to do
WSDL
Types
nThe <types> element defines the data
type that are used by the web service.
nFor maximum platform neutrality, WSDL uses
XML Schema syntax to define data types.
nI want my web service to be accessible to a HTTP client, as
well as to a RMI client and a SOAP client……what
do I need to do
WSDL
Bindings
nThe <binding>
element defines the message format and protocol details for each port.
nbinding
qname – can be anything
qType – points to port
nsoap:binding
qStyle – rpc or document
qTransport – soap protocol to use
noperation
qDefines each operation the the service exposes
WSDL
Bindings
nThe <binding> element provides specific details on how a portType operation will actually be transmitted over
the wire.
nThe
bindings can be made available via multiple transports, including HTTP GET,
HTTP POST, or SOAP.
nThe
bindings provide concrete information on what protocol is being used to
transfer portType operations.
nFor
SOAP protocol, the binding is <soap:binding>, and the transport is SOAP messages on top
of HTTP protocol.
qWSDL 1.1 includes built-in extensions for SOAP 1.1. This
enables you to specify SOAPspecific details, including SOAP headers,
SOAP encoding styles, and the SOAPAction HTTP header. The SOAP extension
elements include:
nsoap:binding
nsoap:operation
nsoap:body
nYou
can specify multiple bindings for a single portType.
WSDL
Services
nThe <services>
element connects the binding to an actual URL where the service is available.
A service element
describes a Web service as a collection of port elements. A port element
defines a specific network address for a binding. The sample below shows the
basic outline of a service that supplies an address for a SOAP binding:
<service
name="ServiceName">
<port name="PortName" binding="BindingRef">
<soap:address location="URL"/>
</port>
</service>
The ServiceName sets the name of the
service. The PortName sets the name of the
specific address. The BindingRef
refers to the name of a binding element. The BindingRef must be namespace
qualified if the targetNamespace for the WSDL
definitions element is not the same as the default namespace.
Complete WSDL Example
SOAP
nSOAP
stands for Simple Object Access Protocol
nSOAP
is a communication protocol
nSOAP
is for communication between applications
nSOAP
is a format for sending messages
nSOAP
communicates via Internet
nSOAP
is platform independent
nSOAP
is language independent
nSOAP
is based on XML
nRelies
on other Application Layer protocols (most notably Remote Procedure Call (RPC)
and HTTP) for message negotiation and transmission.
nSOAP
is a W3C recommendation
SOAP Message Structure
SOAP Request
SOAP Response
UDDI
nUDDI stands for Universal Description,
Discovery and Integration.
nThe UDDI specification enables businesses to
quickly, easily, and dynamically find and transact with one another.
nUDDI enables a business to
1.Describe its business and its services,
2.Discover other businesses that offer desired services
3.Integrate with these other businesses.
UDDI Data Model
The information that makes up a UDDI registry consists
of instances of four core data structure types, the businessEntity,
the businessService, the bindingTemplate and the tModel, together with instances of additional data structure
types defined in the UDDI API Schema.
Each of the core data structure types is used to express
specific types of data, arranged in the relationship shown
Why do we need a
registry
nThe ability to register, discover, and govern
Web services is an essential requirement for any Service Oriented Architecture
(SOA) implementation.
nA highly available environment contains
multiple application server nodes, multiple instances, and multiple processes.
Regardless of where the services will be deployed they have to be flexible
enough to run anywhere without requiring changes to the actual process
implementation.
nThis need may not be fully appreciated in the
early stages of an SOA roll-out when dealing with a small number of services.
nHowever, large organizations will typically
need to support a large number of Web services, and as the number of services
deployed grows to dozens or hundreds, centralized facilities for access and
control of service metadata and artifacts becomes critical.
A service registry provides these
capabilities and is a key infrastructural component and cornerstone for SOA
deployments
Registry and UDDI
UDDI defines a framework
to enable the establishment of service registries to provide distributed
directory service to the producers and consumers of Web services. It includes a
common set of SOAP-based APIs to support registration and advertisement of Web
services by service producers, and to facilitate the searching and lookup of
Web services by service consumers.
Resources
nPeople
and companies develop web services. Some
of them are free too J
qLinks to lotsa web services on one page ! http://www.actionscript.org/forums/showthread.php3?t=70742
qSoftwares
http://www.oracle.com/technology/software/products/jdev/htdocs/soft10135.html
please download the one which has JDK too






















