Sei sulla pagina 1di 8

Introduction

SOAP (originally defined as Simple Object Access Protocol) is a simple XML-based protocol that lets applications exchange information over HTTP. t s!pports t"o possible comm!nication styles# f!nction$%P& and doc!ment style.

Question 1
Remote Procedure Call (RPC)-style web ser ices %P&-style services are tightly co!pled and interface-driven' "hich means that the b!siness methods of the !nderlying implementation determine ho" the (eb )ervice "or*s. The client invo*es the (eb service' sends parameter val!es to the (eb service' "hich exec!tes the corresponding methods and sends bac* the ret!rn val!es. The relationship is synchrono!s' "hich means that the client "aits for a response from the (eb service before it contin!es "ith the reminder of its application. They are typically process-oriented. Modern +nclassified ,!ide (M+,) can !se this style to trac* the n!mber of completed adverts in a given month (e.g. -pril) from the design agency.s database as sho"n in !i"ure 1#1#
Web Services Interface Total Adverts for April Request Applications Programs or Stored Procedures

Database

Total Adverts for April Response

Figure 1.1 RPC-style interaction for brief data exchanges

$ocument-style (%essa"e-style) web ser ices /oc!ment-style services are loosely co!pled and doc!ment driven. They are characteri0ed as asynchrono!s "ith the potential for highly complex doc!ment str!ct!res. The client sends the parameter as an XML doc!ment to the (eb service' "hich receives the entire doc!ment' processes it and may or may not ret!rn a response. They are typically data-oriented. M+, can !se this style to send the basic data re1!ired for the advert as an XML doc!ment to the design agency. They may receive an e-mail ac*no"ledgement from the design agency as they "ait for the final doc!ment to be completed as sho"n in !i"ure 1#&#
Request for Advert design document Web Services Interface #usiness Process Flo$ Receive E-mail Acknowledgment

C eck Database Design

Advert Document Figure 1.2

Send

ocu!ent-style interaction for bul" data exchanges

- )2-P message is encoded as an XML doc!ment' consisting of an$a elements# 'n elope( (Mandatory) - that identifies the XML doc!ment as a )2-P message. )eader( (2ptional) - that contains header information. *ody( (Mandatory) - that contains call and response information. !ault( (2ptional) - that contains errors and stat!s information.

The M+,s %P&-style re1!est and response messages !sed to trac* the n!mber of completed adverts for the month of -pril from the design agency.s database is sho"n in !i"ures 1#+, 1#- and 1#.#
S!AP envelope S!AP bod$ "et od name #etTotalAdverts %nput parameter & April %nput parameter & 'uantit$ S!AP envelope S!AP bod$ "et od return Return value Total Adverts

Figure 1.% RPC-style S&'P !essage

3env#4nvelope xmlns#)2-P56http#$$"""."7.org$8997$9:$soap-envelope6; xmlns#m56http#$$""".advertdesign.com$advert-list6; 3env#Header; 3tx#Transactions-id xmlns#t56http#$$""".transation.com$transactions6 env#m!st+nderstand5.<.; 9:<8 3$tx#Transaction-id; 3$env#Header; 3env#=ody; 3m#,etTotal-dverts; 3month-name;-pril3$month-name; 3advert-total;>!antiy3$advert-total; 3$m#,etTotal-dverts; 3$env#=ody; 3$env#4nvelope; !i"ure 1#- RPC-style SOAP body

3env#4nvelope xmlns#)2-P56http#$$"""."7.org$8997$9:$soap-envelope6 xmlns#m5http#$$""".advertdesign.com$advert-list6; 3env#=ody; 3m#,etTotal-dverts%esponse; 3total -adverts;:93$total-adverts; 3$m#,etTotal-dverts%esponse; 3$env#=ody; 3$env#4nvelope; !i"ure 1#. RPC-style SOAP response messa"e

The M+,s /oc!ment-style re1!est message !sed to send the basic data for the advert layo!t as an XML doc!ment to the design agency is sho"n in !i"ure 1#/ and 1#0#

S!AP envelope S!AP bod$

S!AP envelope S!AP bod$

Advert design document

Acknowledgement Completed advert document

Figure 1.(

ocu!ent-style S&'P !essage

3env#4nvelope xmlns#)2-P56http#$$"""."7.org$8997$9:$soap-envelope6; 3env#Header; 3tx#Transactions-id xmlns#t56http#$$""".transation.com$transactions6 env#m!st+nderstand5.<.; 9:<8 3$tx#Transaction-id; 3$env#Header; 3env#=ody; 3po#P!rchase2rder orderMonth5689<8-9:6 xmlns#m56http#$$""".advertdesign.com$adverts6; 3po#from; 3po#acco!nt?ame; Modern+nclassified,!ide3$po#acco!nt?ame; 3po#acco!nt?!mber; M+,-97@7-<83$po#acco!nt?!mber; 3$po#from; 3po#to; 3po#s!pplier?ame; -dvert /esign Ltd. 3$po#s!pplier?ame; 3po#s!pplier-ddress; )tr!bens Aalley %ooderpoot 3$po#s!pplier-ddres; 3$po#to; 3po#advert; 3po#advert-name; nandis "eightloss 3$po#advert-name; 3po#advert-type; "eightloss 3$po#advert-type; 3po#advert-1ty; @ 3$po#advert-1ty; 3$po#advert; 3$po#P!rchase2rder; 3$env#=ody; 3$env#4nvelope; !i"ure 1#0 $ocument-style SOAP body

Question &
(eb )ervices are soft"are components that can be p!blished' located' and r!n over the nternet !sing XML. The follo"ing technologies form the fo!ndation of the (eb )ervices standard#

)yperte1t 2rans3er Protocol ()22P) is an application protocol for distrib!ted' collaborative' hypermedia information systems and is the fo!ndation of data comm!nication for the (orld (ide (eb. e4tensible %ar5up 6an"ua"e (4%6) is a set of r!les for defining and representing information as str!ct!red doc!ments for applications on the nternet. Simple Object Access Protocol (SOAP) is an XML-based protocol for exchanging information in a distrib!ted environment. 7eb Ser ices $escription 6an"ua"e (7S$6) is an XML-based lang!age for describing (eb )ervices and ho" to access them. 8ni ersal $escription $isco ery and Inte"ration (8$$I) is an XML-based standard for describing' p!blishing' and finding (eb services.

29e Standard bodies in ol ed in 7eb Ser ices are( (orld (ide (eb &onsorti!m ((7&) for XML' )2-P' ()/L and BThe (eb6. nternet 4ngineering Tas* Corce ( 4TC) for T&P' HTTP' TL). 2rgani0ation for the -dvancement of )tr!ct!red nformation )tandards (2-) )) for +// . (eb )ervices nteroperability 2rgani0ation ((/- ) for interoperability r!les.

These standards "or* together as layers on the "eb services protocol stac* as sho"n in !i"ure &#1#

Web Services Protocol Stac" (a$er ) - Service Discover$ *+DD%, (a$er - - Service Description *.SD(, (a$er / - "essaging *0"( and S!AP, (a$er & - Transport *1TTP, Figure 2.1 )he four-layer !odel of the Web Services Protocol Stac"

The service transport layer bet"een applications (HTTP). The messaging layer that provides a common comm!nication method (XML and )2-P). The ser ice description layer that describes the p!blic interface to a specific "eb service (()/L). The ser ice discovery layer that provides registry and repository services for storing and retrieving "eb services interfaces (+// ).

(eb services have become the de facto standard for implementing )ervice 2riented -rchitect!re ()2-). )2- is an architect!ral style for b!ilding soft"are applications that !se services available in a net"or* s!ch as the (eb. !i"ure &#& sho"s ho" )2- organi0es (eb )ervices into three basic roles# service provider' service registry' service re1!ester. These roles interact !sing p!blish' find and bind operations.

5 Provide Service escri3tion WS 2 WS 2

Service Registry

WS 2

Find Services Service Re.uester /xchange 012 based !essages Invo"e4#ind +S&'P over ,))P-

Publish Service escri3tion Service Provider /xchange 012 based !essages

Figure 2.2 S&' reali*ed $ith Web Services

2rgani0ations "ithin the advertising ind!stry can ta*e on one or all of the follo"ing roles# Ser ice pro ider p!blishes the (eb service !sing ()/L to an +// service registry and ma*ing it available on the nternet for the re1!ests of the cons!mers. 2ther advertising ne"spapers' print on demand ne"spaper companies' advertising and design agencies and online small ads "ebsites "o!ld !se these standards to "iden the circ!lation of adverts placed "ith M+,. M+, "o!ld also !se the standards to p!blish its services to the local b!sinesses that need to place adverts "ith its ne"spaper. Ser ice re:uester finds the re1!ired service by 1!erying the service registry +// ' binds "ith the service at the service provider and then invo*es the service !sing )2-P. M+, "o!ld search the service registry for vario!s service providers e.g. advertising and design agencies "ho offer "hen offering cheaper services covering "ide geographical areas. Ser ice re"istry acts as a service bro*er and provides a searchable repository +// of service descriptions "here service providers p!blish their services and service re1!esters find services and obtain binding information for these services.

*ene3its o3 7eb Ser ices standards Strate"ic (eb services expand the amo!nt and *ind of data the trading partners can exchange. This enhances the collaborative activities among trading companies' allo"ing them to participate in a dynamic b!siness relationship "here m!t!ally beneficial information can be shared. They allo" companies to sell their internal service applications to other companies needing similar services' th!s generating ne" reven!es. =y !nloc*ing b!siness information from inside each Binformation silos6 "ithin a company' "eb services can expand the val!e of goods and services delivered to its c!stomer' or create ne" prod!cts and services. In3rastructure (eb services deco!ple service interfaces from implementations and platform considerations' "hile s!pporting an ind!stry-agreed common method to access reso!rces across heterogeneo!s net"or*s and systems.

They integrate previo!sly incompatible comp!ter systems' achieving better data integration and allo"ing applications to be shared internally and externally. Thro!gh "eb services integration' companies can streamline the middle"are technologies that they employ' and red!ce the n!mber of proprietary interfaces in the disDoint systems' providing a cost efficient "ay to integrate many comp!ting reso!rces at the applications level. Operations (ith (eb services applications developed for one proDect may be !sable as a pl!g-and-play architect!re by another proDect' ending d!plication of soft"are code in different gro!ps or systems. =eca!se they are loosely co!ple services by nat!re' companies can tin*er "ith applications "itho!t maDor changes to the interface' th!s avoiding affecting other systems or applications. &ompanies !sing can easily o!tso!rce processes deemed as Bnon-core6 to o!tside providers offering the same services. The can dynamically choose providers and applications best s!ited to their needs on a real-time bases' red!cing the ris* of bad so!rcing decisions. (eb services can be deployed to help integrate different systems from m!ltiple ac1!ired companies going thro!gh mergers and ac1!isitions. Conclusion Question + )2-P s!pports fo!r modes of messaging# %P&$Literal /oc!ment$ Literal %P&$4ncoded /oc!ment$4ncoded

The ()- =asic profile <.9 permits the !se of %P&$Literal or /oc!ment$Literal only. The %P&$4ncoded and /oc!ment$4ncoded are explicitly prohibited. "o!ld recommend !sing )2-P "ith /oc!ment-literal approach for exchanging data. SOAP bene3its t is the standard messaging protocol !sed by (eb services. t is simple as it !ses XML that is "ell str!ct!red and easy to parse. t !ses the HTTP protocol "hich is capable of getting past fire"alls "hich totally bloc* other protocols. t relies on open instead of vendor-specific technologies and th!s enables distrib!ted interoperability and loosely co!pled applications. t has received an official recommendation by the (orld (ide (eb &onsorti!m ((7&).

$ocument-literal style bene3its Interoperability /oc!ment style message provides interoperability and is recommended by ()- . )ome (eb services frame"or*s' incl!ding M).?4T' generate a doc!ment message style message !sing literal encoding. 6oosely Coupled There is more flexibility to change b!siness doc!ments "itho!t affecting all serviced !sers. State %aintenance

f the st!bs generated by a tool*it cannot maintain state' then doc!ment style can be !sed to pass the contents of an entire transaction as an XML doc!ment. The service implementation can then ens!re the processing se1!ence and maintain state in the exec!tion of that se1!ence. ;alidation and use o3 comple1 documents f a service is accepting or ret!rning a complex XML str!ct!red doc!ment' doc!ment style message is better s!ited since yo! can r!n X)L transformations against it' then validate it an XML schema (X)/)' or man!ally massage it ho"ever yo! li*e prior to calling the service. %inimi<e in-memory processin" Marshalling and !n-marshalling parameters to XML in memory can be an intensive process. The )2-P model re1!ires /oc!ment 2bDect Model (/2M)-based processing of the envelope' "hich can lead to large /2M trees in memory if the XML representation is complex. /oc!ment messaging style allo"s other techni1!es li*e )imple -P for XML ()-X) for parsing' XML=eans and &astor XML for c!stom data binding to optimi0e and improve performance' "hich can be a critical factor for services that handle many sim!ltaneo!s re1!ests.

Re3erences(
E<F -bdaldhem' -.' Patric*' C. G Hac1!e' ). P. (899I) J(eb )ervices Technology# )tate of the -rt /efinitions' )tandards' &ase )t!dy.. E2nlineF )eptember. pp. <7-<@. -vailable at# http#$$di!f.!nifr.ch$dr!pal$softeng$sites$di!f.!nifr.ch.dr!pal.softeng$files$file$p!blications$internal$ (P9I-9@.pdf E8F -phrodite' T. G Thomi' P. (8998) An Overview of Standards and Related Technology in Web Services. /istrib!ted and Parallel /atabases E2nlineF. <8 March. pp. @-:. -vailable at# http#$$citeseerx.ist.ps!.ed!$vie"doc$do"nloadKdoi5<9.<.<.L.L8@<Grep5rep<Gtype5pdf E7F =ianco' P.' Motermans*i' %. G Merson' P. (899N) J4val!ating a )ervice-2riented -rchitect!re.. )oft"are 4ngineering nstit!te. E2nlineF. -pril. pp. <:-8L. -vailable at# http#$$""".sei.cm!.ed!$reports$9Ntr9<:.pdf E-ccessed# 8<st -pril' 89<8F E@F &avana!gh' 4. J(eb services# =enefits' challenges' and a !ni1!e' vis!al development sol!tion.. -ltova E2nlineF. pp. N. -vailable at# http#$$""".altova.com$"hitepapers$"ebservices.pdf E:F &erami' 4. (8998) J(eb )ervices 4ssentials.. 2.%eilly Media' nc. E2nlineF. -vailable at# http#$$pro1!est.safariboo*sonline.com$boo*$"eb-development$"ebservices$9:IO9988@O$introd!ction$"ebservess-chp-<-sect-< EOF /erric* H.' &.' >ing H!. (899@) J ntegrating (eb )ervices "ith &ompetitive )trategies# The =alanced )corecard -pproach.. Communications of the Association for Information Systems E2nlineF. <7 Han!ary. pp. O9-O<. -vailable at# http#$$citeseerx.ist.ps!.ed!$vie"doc$do"nloadK doi5<9.<.<.<7O.@NL:Grep5rep<Gtype5pdf ENF 4rl' T. (899@) J)ervice-2riented -rchitect!re# - Cield ,!ide to ntegrating XML and (eb )ervices.. Prentice Hall. E2nlineF. -vailable at# http#$$pro1!est.safariboo*sonline.com$boo*$"ebdevelopment$"eb-services$9<7<@8LIL:$integrating-applications$ch<9

ELF ,oldberg' Mevin H. (899L) !"#$ %isual &uic'Start (uide 8nd ed. Peachpit Press E2nlineF. -vailable at# http#$$pro1!est.safariboo*sonline.com$boo*$xml$INL978<O98:LI$aDax-rss-soap-andmore$ch<Nlev<secO EIF ,!n0er' H. (8998) J ntrod!ction to (eb )ervices.. )orland E2nlineF March. pp @-:. -vailable at# http#$$archive.devx.com$Davasr$"hitepapers$borland$<8N8LH=O"ebserv"p.pdf E<9F Manneganti' %. G &hodavarap!' Prasad -. (899L) J)2- )ec!rity.. Manning P!blications. E2nlineF. -vailable at# http#$$pro1!est.safariboo*sonline.com$boo*$net"or*ing$sec!rity$INL<I787I@OLI$soabasics$ch9< E<<F 2-) ) (2rganisation for the -dvancement of )tr!ct!red nformation )tandards). -vailable at# http#$$""".oasis-"s-i.org$ E<8F 2rt' 4. (899:) J)ervice-2riented -rchitect!re and (eb )ervices# &oncepts' Technologies' and Tools.. 2racle )!n /eveloper ?et"or* ()/?). E2nlineF. -pril. pp. 7-N. -vailable at# http#$$Dava.s!n.com$developer$technical-rticles$(eb)ervices$soa8$ E<7F J2vervie"# (eb )ervices )tandards and )pecifications.. inno& E2nlineF. pp. I. -vailable at# http#$$""".inno1.com$reso!rces$(eb)ervices)tandards2vervie"-899:-9<.pdf E<@F Papa0oglo!' Michael P. (899N) J(eb )ervices# Principles and Technologies.. E2nlineF. pp. N. -vailable at# http#$$cgi.cse.!ns".ed!.a!$Psoc$icsoc9L$s!mmerQschool$soaQanalysis.pdf E<:F Poh Lee' ).' Peng &han L. G Lee' (. J(eb )ervices mplementation Methodology for )2-pplication.. )ingapore nstit!te of Man!fact!ring Technology E2nlineF. pp. 7. -vailable at# http#$$f"si.org$reso!rces$ ?/ ?9O-()R89Methodology-Cinal.pdf E<OF )nell' H.' Tid"ell' /. G M!lchen*o' P. (899<) JProgramming (eb )ervices "ith )2-P.. 2.%eilly Media' nc. E2nlineF. -vailable at# http#$$my.safariboo*sonline.com$boo*$"eb-development$"ebservices$9:IO999I:8$introd!cing-soap$prog"ebsoap-chp-8-sect-< E<NF )2-P t!torial# -vailable at# http#$$"""."7schools.com$soap$ E<LF Torry Harris. J)2- (eb )ervices nteraction Models.. E2nlineF. pp. 7-L. -vailable at# http#$$""".thbs.com$pdfs$"hitepaperQ"sim.pdf E<IF +// )pecifications# http#$$""".oasis-open.org$committees$tcQhome.phpK"gQabbrev5!ddispec E89F (7& )2-P )pecifications# http#$$"""."7.org$T%$soap$ E-ccessed# <:th -pril' 89<8F E8<F (7& ()/L )pecifications# http#$$"""."7.org$T%$"sdl E-ccessed# <:th -pril' 89<8F

Potrebbero piacerti anche