Basics of SOA

Embed Size (px)

Citation preview

  • 8/10/2019 Basics of SOA

    1/67

    Basics of SOA Testing

    Author : Manas Ranjan Dhal

  • 8/10/2019 Basics of SOA

    2/67

    J anuary25, 2012

    Contents

    What is SOA?

    Traditional MVC vs SOA

    Why SOA needed?

    What is Web service and itssignificance?

    What is WSDL?

    What is SOA !rotocol andits significance?

    "ntrod#ction to SOA testing

    Challenges in SOA testing

    Test A!!roach With SOA

    $o% %e overco&e the

    challenges'

    "ntrod#ction to arasoft SOAtest tool'

    Concl#sion

  • 8/10/2019 Basics of SOA

    3/67

    J anuary25, 2012

    What is SOA

    Service(Oriented Architect#re )SOA* is an architect#ral style

    A!!lications b#ilt #sing an SOA style deliver f#nctionality as services

    )e'g Create C#sto&er+ ,et C#sto&er "nfo+ Add Acco#nt f#nctionalities

    in a ban-ing do&ain* that can be #sed or re#sed %hen b#ilding

    a!!lications or integrating %ithin the enter!rise or trading !artners'

    A service(oriented architect#re is essentially a collection of services

    %hich is based on heterogeneo#s technologies'

  • 8/10/2019 Basics of SOA

    4/67

    J anuary25, 2012

    Traditional MVC vs SOA MVC divides the a!!lication into !resentation+ b#siness f#nctions+

    and data access layers'

    resentation i&!le&ented %ith /S0servlets' 1#siness logic

    i&!le&ented %ith O/Os or 2/1s' Data access logic i&!le&ented

    %ith /A0$ibernate

    $ere each b#siness f#nction %ill have its o%n set of controller logicand solely de!endent on the a!!lication and technology it

    i&!le&ented %ith'

    With SOA+ the b#siness f#nctions can be abstracted o#t of the core

    a!!lication !rocesses and se!arated as re#sable services' The

    services can no% be #sed %ith other a!!lications inde!endent oftechnology and !latfor&' The services allo% for ch better

    co&!onent creation+ and allo%s for ease of great things li-e single

    sign on+ data syncing+ sec#rity+ fle3ibility etc

  • 8/10/2019 Basics of SOA

    5/67

    J anuary25, 2012

    Why SOA

    The reality in "T enter!rises is that infrastr#ct#re is heterogeneo#sacross o!erating syste&s+ a!!lications+ syste& soft%are+ anda!!lication infrastr#ct#re'

    2nter!rises sho#ld 4#ic-ly res!ond to b#siness changes %ith agility '1#t so&e e3isting a!!lications are #sed to r#n c#rrent b#siness

    !rocesses+ so starting fro& scratch to b#ild ne% infrastr#ct#re isn5t ano!tion'

    SOA %ith its loosely co#!led nat#re allo%s enter!rises to !l#g in ne%

    services or #!grade e3isting services in a gran#lar fashion to address

    the ne% b#siness re4#ire&ents+ !rovides the o!tion to &a-e the

    services cons#&able across different channels+ and e3!oses thee3isting enter!rise and legacy a!!lications as services+ thereby

    safeg#arding e3isting "T infrastr#ct#re invest&ents'

  • 8/10/2019 Basics of SOA

    6/67

    J anuary25, 2012

    Benefits Of SOA

    latfor& and technology inde!endent'

    Mod#lari6ed and less co&!le3'

    Lo% integration cost'

    Sec#re and reliable'

    Loosely co#!led'

    Change is easy'

    7e(#sable across the b#siness channels'

  • 8/10/2019 Basics of SOA

    7/67

    J anuary25, 2012

    We Service

    The W8C defines a 9Web service9 as 9a soft%are syste& designed to

    s#!!ort intero!erable &achine(to(&achine interaction over a

    net%or-9'

    "t has an interface described in a &achine(!rocessable for&at

    )s!ecifically Web Services Descri!tion Lang#age+ -no%n by theacrony& WSDL*'

    Other syste&s interact %ith the Web service in a &anner !rescribed

    by its descri!tion #sing SOA)Si&!le Ob:ect Access rotocol*

    &essages+ ty!ically conveyed #sing $TT'

  • 8/10/2019 Basics of SOA

    8/67

    J anuary25, 2012

    WSD! The We Services Descri"tion !anguageis an ;ML(based lang#age

    that is #sed for describing the f#nctionality offered by a Web(Service'

    A WSDL descri!tion of a %eb service !rovides a &achine(readable

    descri!tion of ho% the service can be called+ %hat !ara&eters it

    e3!ects+ and %hat data str#ct#res it ret#rns' "t th#s serves a ro#ghly

    si&ilar !#r!ose as a &ethod signat#re in a !rogra&&ing lang#age'

    WSDL is often #sed in co&bination %ith SOA and an ;ML Sche&ato !rovide Web services over the "nternet'

    A client !rogra& connecting to a Web service can read the WSDL file

    to deter&ine %hat o!erations are available on the server' Any s!ecial

    dataty!es #sed are e&bedded in the WSDL file in the for& of ;ML

    Sche&a' The client can then #se SOA to act#ally call one of the

    o!erations listed in the WSDL file #sing ;ML or $TT'

  • 8/10/2019 Basics of SOA

    9/67

    J anuary25, 2012

    WSDL Doc#&ent Str#ct#re

    A WSDL doc#&ent describes a %eb service #sing these &a:or ele&ents A container for data ty!e definitions #sed by the %eb service

    =&essage>A ty!ed definition of the data being co&nicated

    =!ortTy!e> A set of o!erations s#!!orted by one or &ore end!oints

    =binding> A !rotocol and data for&at s!ecification for a !artic#lar !ort

    ty!e

  • 8/10/2019 Basics of SOA

    10/67

    J anuary25, 2012

    WSDL Doc#&ent Str#ct#reWSDL orts

    The =!ortTy!e> ele&ent is the &ost i&!ortant WSDL ele&ent' "t describes a

    %eb service+ the o!erations that can be !erfor&ed+ and the &essages that

    are involved'The =!ortTy!e> ele&ent can be co&!ared to a f#nction library

    )or a &od#le+ or a class* in a traditional !rogra&&ing lang#age'

    WSDL Messages

    The =&essage> ele&ent defines the data ele&ents of an o!eration'2ach

    &essage can consist of one or &ore !arts' The !arts can be co&!ared to the

    !ara&eters of a f#nction call in a traditional !rogra&&ing lang#age'

    WSDL Ty!es

    The =ty!es> ele&ent defines the data ty!es that are #sed by the %eb service'or

    &a3i& !latfor& ne#trality+ WSDL #ses ;ML Sche&a synta3 to define data

    ty!es'

    WSDL 1indings

    The =binding> ele&ent defines the data for&at and !rotocol for each !ort ty!e'

  • 8/10/2019 Basics of SOA

    11/67

    J anuary25, 2012

    Str#ct#re of a WSDL=definitions>

    =ty!es>

    data ty!e definitions''''''''

    =0ty!es>

    =&essage>

    definition of the data being co&nicated''''=0&essage>

    =!ortTy!e>

    set of o!erations''''''

    =0!ortTy!e>

    =binding>

    !rotocol and data for&at s!ecification''''

    =0binding>

    =0definitions>

  • 8/10/2019 Basics of SOA

    12/67

    J anuary25, 2012

    Ty"ical Service #nteractions

  • 8/10/2019 Basics of SOA

    13/67

    J anuary25, 2012

    SOA$ SOA stands for Si&!le Ob:ect Access rotocol

    SOA is a co&nication !rotocol for co&nication bet%een

    service based a!!lications

    SOA is a for&at for sending &essages

    SOA relies on other a!!lication layer !rotocols+ li-e $y!erte3t

    Transfer rotocol )$TT* or Si&!le Mail Transfer rotocol )SMT*+for &essage negotiation and trans&ission

    SOA is !latfor& inde!endent

    SOA is lang#age inde!endent

    SOA is based on ;ML SOA is si&!le and e3tensible

    SOA allo%s yo# to get aro#nd fire%alls

  • 8/10/2019 Basics of SOA

    14/67

    J anuary25, 2012

    Why SOA$

    Today5s a!!lications co&nicate #sing 7e&ote roced#re Calls

    )7C* bet%een different ob:ects'

    7C re!resents a co&!atibility and sec#rity !roble&@ fire%alls and

    !ro3y servers %ill nor&ally bloc- this -ind of traffic'

    A better %ay to co&nicate bet%een a!!lications is over $TT+beca#se $TT is s#!!orted by all "nternet bro%sers and servers'

    SOA %as created to acco&!lish this'

    SOA !rovides a %ay to co&nicate bet%een a!!lications r#nning

    on different o!erating syste&s+ %ith different technologies and

    !rogra&&ing lang#ages'

  • 8/10/2019 Basics of SOA

    15/67

    J anuary25, 2012

    SOA$ Synta%

    A SOA &essage is an ordinary ;ML doc#&ent containing the follo%ingele&ents