SlideShare a Scribd company logo
1 of 28
Download to read offline
WebServices:
Principles&Technology
Slide 4.1
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Mike P. Papazoglou
mikep@uvt.nl
Chapter 4
SOAP: Simple Object Access Protocol
Slide 4.2
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Topics
•• Inter application communicationInter application communication
•• SOAP as a messaging protocolSOAP as a messaging protocol
•• Structure of a SOAP messageStructure of a SOAP message
•• SOAP communication modelSOAP communication model
•• SOAP fault messageSOAP fault message
•• SOAP over HTTPSOAP over HTTP
•• Advantages and disadvantages of SOAPAdvantages and disadvantages of SOAP
Slide 4.3
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Inter-Application Communication
• Conventional distributed applications use distributed communication
technologies, e.g., CORBA, DCOM, Java/RMI, based on object RPC
(ORPC) protocols that attempted to marry object orientation and
network protocols.
– ORPC request is an identifier or symbolic name that the server could use to
locate the target object inside the server process.
• Weaknesses
– Both ends of the communication link would need to be implemented under
the same distributed object model (Java/RMI or CORBA/IIOP)
– Difficulty of getting these protocols to work over firewalls or proxy servers,
e.g, most firewalls are configured to allow hypertext transfer protocol
(HTTP) to pass across, but not IIOP.
• To address the problem of overcoming proprietary systems running on
heterogeneous infrastructures, Web services rely on SOAP, an XML-
based communication protocol for exchanging messages between
computers regardless of their operating systems, programming
environment or object model framework.
Slide 4.4
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Topics
•• Inter application communicationInter application communication
•• SOAP as a messaging protocolSOAP as a messaging protocol
•• Structure of a SOAP messageStructure of a SOAP message
•• SOAP communication modelSOAP communication model
•• SOAP fault messageSOAP fault message
•• SOAP over HTTPSOAP over HTTP
•• Advantages and disadvantages of SOAPAdvantages and disadvantages of SOAP
Slide 4.5
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
What is SOAP?
• SOAP is the standard messaging protocol used by Web services.
SOAP’s primary application is inter application communication. SOAP
codifies the use of XML as an encoding scheme for request and
response parameters using HTTP as a means for transport.
Service providerService requestor
Application object
(client)
Application object
(service provider)
SOAP-based
middleware
SOAP-based
middleware
SOAP messages
exchanged on top of,
HTTP, SMTP, or other
transport
Converts procedure calls to/from XML
messages sent through HTTP or other
protocols.
Slide 4.6
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
What is SOAP? (continued)
• SOAP covers the following four main areas:
– A message format for one-way communication describing
how a message can be packed into an XML document.
– A description of how a SOAP message should be
transported using HTTP (for Web-based interaction) or SMTP
(for e-mail-based interaction).
– A set of rules that must be followed when processing a
SOAP message and a simple classification of the entities
involved in processing a SOAP message.
– A set of conventions on how to turn an RPC call into a
SOAP message and back.
Slide 4.7
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
SOAP as a lightweight protocol
• SOAP is a lightweight protocol
that allows applications to pass
messages and data back and
forth between disparate systems
in a distributed environment
enabling remote method
invocation.
• By lightweight we mean that the
SOAP protocol possesses only
two fundamental properties. It
can:
– send and receive HTTP (or
other) transport protocol packets,
and
– process XML messages.
• This can be contrasted with the
heavyweight protocols such as
ORPC protocols.
Slide 4.8
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Distributed messaging using SOAP
Slide 4.9
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Topics
•• Inter application communicationInter application communication
•• SOAP as a messaging protocolSOAP as a messaging protocol
•• Structure of a SOAP messageStructure of a SOAP message
•• SOAP communication modelSOAP communication model
•• SOAP fault messageSOAP fault message
•• SOAP over HTTPSOAP over HTTP
•• Advantages and disadvantages of SOAPAdvantages and disadvantages of SOAP
Slide 4.10
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
SOAP messages
• SOAP is based on message exchanges.
• Messages are seen as envelopes where
the application encloses the data to be
sent.
• A SOAP message consists of an
<Envelope> element containing an
optional <Header> and a mandatory
<Body> element.
• The contents of these elements are
application defined and not a part of the
SOAP specification.
• A SOAP <Header> contains blocks of
information relevant to how the message is
to be processed. This helps pass
information in SOAP messages that is not
for the application but for the SOAP engine
• The SOAP <Body> is where the main end-
to-end information conveyed in a SOAP
message must be carried.
SOAP envelope
SOAP header
header block
SOAP body
body block
Slide 4.11
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
<env:Envelope
xmlns:env=“http://www.w3.org/2003/05/soap-envelope”
env:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”>
……
</env:Envelope>
<env:Envelope
xmlns:env=“http://www.w3.org/2003/05/soap-envelope” >
…
<env:Header>
<tx:transaction-id
xmlns:tx=”http://www.transaction.com/transaction”
env:mustUnderstand=”true”>
512
</tx:transaction-id>
<notary:token xmlns:notary=”http://www.notarization-services.com/token”
env:mustUnderstand=”true”>
GRAAL-5YF3
</notary:token>
</env:Header>
……………
</env:Envelope>
Example of SOAP envelope
Example of SOAP header
SOAP envelope and header
Slide 4.12
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
SOAP Intermediaries
• SOAP headers have been
designed in anticipation of
participation of other SOAP
processing nodes – called SOAP
intermediaries – along a
message's path from an initial
SOAP sender to an ultimate
SOAP receiver.
• A SOAP message travels along
the message path from a sender
to a receiver.
• All SOAP messages start with an
initial sender, which creates the
SOAP message, and end with an
ultimate receiver.
Slide 4.13
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope
xmlns:env=“http://www.w3.org/2003/05/soap-envelope”>
<env:Header>
<m:order
xmlns:m="http://www.plastics_supply.com/purchase-order"
env:role="http://www.w3.org/2003/05/soap-
envelope/role/next"
env:mustUnderstand="true">
<m:order-no >uuid:0411a2daa</m:order-no>
<m:date>2004-11-8</m:date>
</m:order>
<n:customer xmlns:n="http://www.supply.com/customers"
env:role="http://www.w3.org/2003/05/soap-
envelope/role/next"
env:mustUnderstand="true">
<n:name> Marvin Sanders </n:name>
</n:customer >
</env:Header>
<env:Body>
<-- Payload element goes here -->
</env:Body>
</env:Envelope>
Example of SOAP header with
message routing
The “next” role is one
that all SOAP nodes are
required to support;
By tagging each header
in this message with the
“next” role, this message
is saying that all SOAP
nodes (intermediaries
and the ultimate
receiver) MUST
understand and be able
to process the m:order
header and the
n:customer header.
Slide 4.14
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
The SOAP Body
• The SOAP body is the area of the SOAP message, where the
application specific XML data (payload) being exchanged in the
message is placed.
• The <Body> element must be present and is an immediate child of the
envelope. It may contain a number of child elements, called body
entries, but it may also be empty. The <Body> element contains either
of the following:
– Application-specific data: is the information that is exchanged with a Web
service. The SOAP <Body> is where the method call information and its
related arguments are encoded. It is where the response to a method call is
placed, and where error information can be stored.
– fault message: is used only when an error occurs.
• A SOAP message may carry either application-specific data or a fault,
but not both.
Slide 4.15
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Example SOAP Message
<?xml version='1.0' ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope" >
<env:Header>
<t:transactionID
xmlns:t="http://intermediary.example.com/procurement"
env:role="http://www.w3.org/2002/06/soap-envelope/role/next"
env:mustUnderstand="true" >
57539
</t:transactionID>
</env:Header>
<env:Body>
<m:orderGoods
env:encodingStyle="http://www.w3.org/2002/06/soap-encoding"
xmlns:m="http://example.com/procurement">
<m:productItem>
<name>ACME Softener</name>
</m:productItem>
<m:quantity>
35
</m:quantity>
</m:orderGoods>
</env:Body>
</env:Envelope>
Header
Body
Blocks
Envelope
Slide 4.16
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Topics
•• Inter application communicationInter application communication
•• SOAP as a messaging protocolSOAP as a messaging protocol
•• Structure of a SOAP messageStructure of a SOAP message
•• SOAP communication modelSOAP communication model
•• SOAP fault messageSOAP fault message
•• SOAP over HTTPSOAP over HTTP
•• Advantages and disadvantages of SOAPAdvantages and disadvantages of SOAP
Slide 4.17
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
The SOAP Communication Model
• SOAP supports two possible communication styles:
– remote procedure call (RPC) and
– document (or message).
RPC-style interaction Document-style interaction
Slide 4.18
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
RPC-style SOAP Services
• A remote procedure call (RPC)-style Web service appears as a remote
object to a client application. The interaction between a client and an
RPC-style Web service centers around a service-specific interface.
Clients express their request as a method call with a set of arguments,
which returns a response containing a return value.
SOAP envelope
SOAP body
Method name
orderGoods
Input parameter 1
product item
Input parameter 2
quantity
SOAP envelope
SOAP body
Method return
Return value
order id
Slide 4.19
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
<env:Envelope
xmlns:SOAP=“http://www.w3.org/2003/05/soap-envelope”
xmlns:m="http://www.plastics_supply.com/product-prices">
<env:Header>
<tx:Transaction-id
xmlns:t=”http://www.transaction.com/transactions”
env:mustUnderstand='1'>
512
</tx:Transaction-id>
</env:Header>
<env:Body>
<m:GetProductPrice>
<product-id> 450R6OP </product-id >
</m:GetProductPrice >
</env:Body>
</env:Envelope>
<env:Envelope
xmlns:SOAP=“http://www.w3.org/2003/05/soap-envelope”
xmlns:m="http://www.plastics_supply.com/product-prices">
<env:Header>
<--! – Optional context information -->
</env:Header>
<env:Body>
<m:GetProductPriceResponse>
<product-price> 134.32 </product-price>
</m:GetProductPriceResponse>
</env:Body>
</env:Envelope>
Example of RPC-style SOAP body
Example of RPC-style SOAP response message
RPC-style web services
Slide 4.20
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Document (Message)-style SOAP Services
• In the document-style of messaging, the SOAP <Body> contains an
XML document fragment. The <Body> element reflects no explicit XML
structure.
• The SOAP run-time environment accepts the SOAP <Body> element
as it stands and hands it over to the application it is destined for
unchanged. There may or may not be a response associated with this
message.
SOAP envelope
SOAP body
PurchaseOrder
document
-product item
-quantity
SOAP envelope
SOAP body
Acknowledgement
document
-order id
Slide 4.21
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
<env:Envelope
xmlns:SOAP=“http://www.w3.org/2003/05/soap-envelope”>
<env:Header>
<tx:Transaction-id
xmlns:t=”http://www.transaction.com/transactions”
env:mustUnderstand='1'>
512
</env:Header>
<env:Body>
<po:PurchaseOrder oderDate=”2004-12-02”
xmlns:m="http://www.plastics_supply.com/POs">
<po:from>
<po:accountName> RightPlastics </po:accountName>
<po:accountNumber> PSC-0343-02 </po:accountNumber>
</po:from>
<po:to>
<po:supplierName> Plastic Supplies Inc. </po:supplierName>
<po:supplierAddress> Yara Valley Melbourne </po:supplierAddress>
</po:to>
<po:product>
<po:product-name> injection molder </po:product-name>
<po:product-model> G-100T </po:product-model>
<po:quantity> 2 </po:quantity>
</po:product>
</ po:PurchaseOrder >
</env:Body>
</env:Envelope>
Example of document-style SOAP body
Example of document-style SOAP body
Slide 4.22
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Topics
•• Inter application communicationInter application communication
•• SOAP as a messaging protocolSOAP as a messaging protocol
•• Structure of a SOAP messageStructure of a SOAP message
•• SOAP communication modelSOAP communication model
•• SOAP fault messageSOAP fault message
•• SOAP over HTTPSOAP over HTTP
•• Advantages and disadvantages of SOAPAdvantages and disadvantages of SOAP
Slide 4.23
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
SOAP Fault element
• SOAP provides a model for handling faults arise.
• It distinguishes between the conditions that result in a fault, and the ability to
signal that fault to the originator of the faulty message or another node. The
SOAP <Body> is the place where fault information is placed.
<env:Envelope
xmlns:SOAP=“http://www.w3.org/2003/05/soap-envelope”
xmlns:m="http://www.plastics_supply.com/product-prices">
<env:Header>
<tx:Transaction-id
xmlns:t=”http://www.transaction.com/transactions”
env:mustUnderstand='1'>
512
</tx:Transaction-id>
</env:Header>
<env:Body>
<env:Fault>
<env:Code>
<env:Value>env:Sender</env:Value>
<env:Subcode>
<env:Value> m:InvalidPurchaseOrder </env:Value>
</env:Subcode>
</env:Code>
<env:Reason>
<env:Text xml:lang="en-UK"> Specified product did not exist </env:Text>
</env:Reason>
<env:Detail>
<err:myFaultDetails
xmlns:err="http://www.plastics_supply.com/faults">
<err:message> Product number contains invalid characters </err:message>
<err:errorcode> 129 </err:errorcode>
</err:myFaultDetails>
</env:Detail>
</env:Fault>
</env:Body>
</env:Envelope>
Slide 4.24
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Topics
•• Inter application communicationInter application communication
•• SOAP as a messaging protocolSOAP as a messaging protocol
•• Structure of a SOAP messageStructure of a SOAP message
•• SOAP communication modelSOAP communication model
•• SOAP fault messageSOAP fault message
•• SOAP over HTTPSOAP over HTTP
•• Advantages and disadvantages of SOAPAdvantages and disadvantages of SOAP
Slide 4.25
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
SOAP and HTTP
 A binding of SOAP to a transport protocol is
a description of how a SOAP message is to
be sent using that transport protocol.
 The typical binding for SOAP is HTTP.
 SOAP can use GET or POST. With GET,
the request is not a SOAP message but the
response is a SOAP message, with POST
both request and response are SOAP
messages (in version 1.2, version 1.1
mainly considers the use of POST).
 SOAP uses the same error and status
codes as those used in HTTP so that HTTP
responses can be directly interpreted by a
SOAP module.
SOAP envelope
SOAP header
Transactional
context
SOAP body
Input parameter 1
Input parameter 2
Name of procedure
HTTP POST
Slide 4.26
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
RPC call using SOAP over HTTP
Service provider
SOAP
engine
Service implementation
(other tiers)
HTTP
engine
Service requestor
HTTP
engine
Client implementation (other
tiers)
SOAP
engine
SOAP envelope
SOAP header
Transactional
context
SOAP body
Name of the
procedure
Input parameter 1
Input parameter 2
HTTP Post
SOAP envelope
SOAP header
transactional
context
SOAP body
return
parameter
SOAP envelope
SOAP header
Transactional
context
SOAP body
Return
parameter
HTTP Post
Slide 4.27
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Topics
•• Inter application communicationInter application communication
•• SOAP as a messaging protocolSOAP as a messaging protocol
•• Structure of a SOAP messageStructure of a SOAP message
•• SOAP communication modelSOAP communication model
•• SOAP fault messageSOAP fault message
•• SOAP over HTTPSOAP over HTTP
•• Advantages and disadvantages of SOAPAdvantages and disadvantages of SOAP
Slide 4.28
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Advantages and disadvantages of SOAP
• Advantages of SOAP are:
– Simplicity
– Portability
– Firewall friendliness
– Use of open standards
– Interoperability
– Universal acceptance.
• Disadvantages of SOAP are:
– Too much reliance on HTTP
– Statelessness
– Serialization by value and not by reference.
Try not to laugh too hard at this assertion!!!

More Related Content

What's hot

SOAP - Simple Object Access Protocol
SOAP - Simple Object Access ProtocolSOAP - Simple Object Access Protocol
SOAP - Simple Object Access ProtocolAnushka Patil
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web servicesNeil Ghosh
 
Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Mehul Boricha
 
The Full Power of ASP.NET Web API
The Full Power of ASP.NET Web APIThe Full Power of ASP.NET Web API
The Full Power of ASP.NET Web APIEyal Vardi
 
Excellent rest using asp.net web api
Excellent rest using asp.net web apiExcellent rest using asp.net web api
Excellent rest using asp.net web apiMaurice De Beijer [MVP]
 
computer networks layers
computer networks layerscomputer networks layers
computer networks layersStudent
 
Application layer chapter-9
Application layer chapter-9Application layer chapter-9
Application layer chapter-9Student
 
Web Services Tutorial
Web Services TutorialWeb Services Tutorial
Web Services TutorialLorna Mitchell
 
CS8651 Internet Programming - Basics of HTML, HTML5, CSS
CS8651   Internet Programming - Basics of HTML, HTML5, CSSCS8651   Internet Programming - Basics of HTML, HTML5, CSS
CS8651 Internet Programming - Basics of HTML, HTML5, CSSVigneshkumar Ponnusamy
 
webservices overview
webservices overviewwebservices overview
webservices overviewelliando dias
 
Web Services Presentation - Introduction, Vulnerabilities, & Countermeasures
Web Services Presentation - Introduction, Vulnerabilities, & CountermeasuresWeb Services Presentation - Introduction, Vulnerabilities, & Countermeasures
Web Services Presentation - Introduction, Vulnerabilities, & CountermeasuresPraetorian
 
Soap web service
Soap web serviceSoap web service
Soap web serviceNITT, KAMK
 
Web technologies: HTTP
Web technologies: HTTPWeb technologies: HTTP
Web technologies: HTTPPiero Fraternali
 
Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonAdnan Masood
 
SOAP:Simple Object Access Protocol -XML-RPC
SOAP:Simple Object Access Protocol-XML-RPCSOAP:Simple Object Access Protocol-XML-RPC
SOAP:Simple Object Access Protocol -XML-RPCelliando dias
 
A Conversation About REST - Extended Version
A Conversation About REST - Extended VersionA Conversation About REST - Extended Version
A Conversation About REST - Extended VersionJeremy Brown
 
Introduction to Web Services
Introduction to Web ServicesIntroduction to Web Services
Introduction to Web ServicesIoannis Baltopoulos
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Peter R. Egli
 

What's hot (20)

SOAP - Simple Object Access Protocol
SOAP - Simple Object Access ProtocolSOAP - Simple Object Access Protocol
SOAP - Simple Object Access Protocol
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
 
Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)
 
The Full Power of ASP.NET Web API
The Full Power of ASP.NET Web APIThe Full Power of ASP.NET Web API
The Full Power of ASP.NET Web API
 
Simple object access protocol(soap )
Simple object access protocol(soap )Simple object access protocol(soap )
Simple object access protocol(soap )
 
Excellent rest using asp.net web api
Excellent rest using asp.net web apiExcellent rest using asp.net web api
Excellent rest using asp.net web api
 
computer networks layers
computer networks layerscomputer networks layers
computer networks layers
 
Application layer chapter-9
Application layer chapter-9Application layer chapter-9
Application layer chapter-9
 
Web Services Tutorial
Web Services TutorialWeb Services Tutorial
Web Services Tutorial
 
CS8651 Internet Programming - Basics of HTML, HTML5, CSS
CS8651   Internet Programming - Basics of HTML, HTML5, CSSCS8651   Internet Programming - Basics of HTML, HTML5, CSS
CS8651 Internet Programming - Basics of HTML, HTML5, CSS
 
webservices overview
webservices overviewwebservices overview
webservices overview
 
Web Services Presentation - Introduction, Vulnerabilities, & Countermeasures
Web Services Presentation - Introduction, Vulnerabilities, & CountermeasuresWeb Services Presentation - Introduction, Vulnerabilities, & Countermeasures
Web Services Presentation - Introduction, Vulnerabilities, & Countermeasures
 
Soap web service
Soap web serviceSoap web service
Soap web service
 
Web technologies: HTTP
Web technologies: HTTPWeb technologies: HTTP
Web technologies: HTTP
 
Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
 
SOAP:Simple Object Access Protocol -XML-RPC
SOAP:Simple Object Access Protocol-XML-RPCSOAP:Simple Object Access Protocol-XML-RPC
SOAP:Simple Object Access Protocol -XML-RPC
 
A Conversation About REST - Extended Version
A Conversation About REST - Extended VersionA Conversation About REST - Extended Version
A Conversation About REST - Extended Version
 
Introduction to Web Services
Introduction to Web ServicesIntroduction to Web Services
Introduction to Web Services
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
Web Service
Web ServiceWeb Service
Web Service
 

Viewers also liked

Introducing visual studio_2010_v1.0--chappell
Introducing visual studio_2010_v1.0--chappellIntroducing visual studio_2010_v1.0--chappell
Introducing visual studio_2010_v1.0--chappellAravindharamanan S
 
Workshop 04 android-development
Workshop 04 android-developmentWorkshop 04 android-development
Workshop 04 android-developmentAravindharamanan S
 
Visual studio-2012-product-guide
Visual studio-2012-product-guideVisual studio-2012-product-guide
Visual studio-2012-product-guideAravindharamanan S
 
Rad grid dynamically building a grid and adding a hierarchy with declarative...
Rad grid  dynamically building a grid and adding a hierarchy with declarative...Rad grid  dynamically building a grid and adding a hierarchy with declarative...
Rad grid dynamically building a grid and adding a hierarchy with declarative...Aravindharamanan S
 
Lec7 collaborative filtering
Lec7 collaborative filteringLec7 collaborative filtering
Lec7 collaborative filteringAravindharamanan S
 
Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0Aravindharamanan S
 
Twdatasci cjlin-big data analytics - challenges and opportunities
Twdatasci cjlin-big data analytics - challenges and opportunitiesTwdatasci cjlin-big data analytics - challenges and opportunities
Twdatasci cjlin-big data analytics - challenges and opportunitiesAravindharamanan S
 
Emergency androidstudiochapter
Emergency androidstudiochapterEmergency androidstudiochapter
Emergency androidstudiochapterAravindharamanan S
 
Collab filtering-tutorial
Collab filtering-tutorialCollab filtering-tutorial
Collab filtering-tutorialAravindharamanan S
 

Viewers also liked (19)

Introducing visual studio_2010_v1.0--chappell
Introducing visual studio_2010_v1.0--chappellIntroducing visual studio_2010_v1.0--chappell
Introducing visual studio_2010_v1.0--chappell
 
Workshop 04 android-development
Workshop 04 android-developmentWorkshop 04 android-development
Workshop 04 android-development
 
9 content-providers
9 content-providers9 content-providers
9 content-providers
 
Aws tkv-ug
Aws tkv-ugAws tkv-ug
Aws tkv-ug
 
Visual studio-2012-product-guide
Visual studio-2012-product-guideVisual studio-2012-product-guide
Visual studio-2012-product-guide
 
Rad grid dynamically building a grid and adding a hierarchy with declarative...
Rad grid  dynamically building a grid and adding a hierarchy with declarative...Rad grid  dynamically building a grid and adding a hierarchy with declarative...
Rad grid dynamically building a grid and adding a hierarchy with declarative...
 
Item based approach
Item based approachItem based approach
Item based approach
 
Lec7 collaborative filtering
Lec7 collaborative filteringLec7 collaborative filtering
Lec7 collaborative filtering
 
Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0
 
Twdatasci cjlin-big data analytics - challenges and opportunities
Twdatasci cjlin-big data analytics - challenges and opportunitiesTwdatasci cjlin-big data analytics - challenges and opportunities
Twdatasci cjlin-big data analytics - challenges and opportunities
 
Emergency androidstudiochapter
Emergency androidstudiochapterEmergency androidstudiochapter
Emergency androidstudiochapter
 
Android wear notes
Android wear notesAndroid wear notes
Android wear notes
 
Brian.suda.thesis
Brian.suda.thesisBrian.suda.thesis
Brian.suda.thesis
 
Collaborative filtering
Collaborative filteringCollaborative filtering
Collaborative filtering
 
Wcf tutorial
Wcf tutorialWcf tutorial
Wcf tutorial
 
Recommender lecture
Recommender lectureRecommender lecture
Recommender lecture
 
Robust recommendation
Robust recommendationRobust recommendation
Robust recommendation
 
Release documentation
Release documentationRelease documentation
Release documentation
 
Collab filtering-tutorial
Collab filtering-tutorialCollab filtering-tutorial
Collab filtering-tutorial
 

Similar to Lecture 3 soap

web programming
web programmingweb programming
web programmingshreeuva
 
WebServices.ppt
WebServices.pptWebServices.ppt
WebServices.pptIftikhar70
 
Soa business centric and soap basic
Soa business centric and soap basicSoa business centric and soap basic
Soa business centric and soap basicJothi Lakshmi
 
Soap Standard
Soap StandardSoap Standard
Soap StandardKumar
 
Introduction to WebServices
Introduction to WebServicesIntroduction to WebServices
Introduction to WebServicesKhasim Cise
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTC# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTDr. Awase Khirni Syed
 
Mule Webservices
Mule WebservicesMule Webservices
Mule WebservicesShahid Shaik
 
WebServices Basic Overview
WebServices Basic OverviewWebServices Basic Overview
WebServices Basic OverviewKhan625
 
WebServices Basic Overview
WebServices Basic OverviewWebServices Basic Overview
WebServices Basic OverviewRajkattamuri
 
Java Web Service - Summer 2004
Java Web Service - Summer 2004Java Web Service - Summer 2004
Java Web Service - Summer 2004Danny Teng
 
Xml Messaging With Soap
Xml Messaging With SoapXml Messaging With Soap
Xml Messaging With SoapAkramWaseem
 
Xml messaging with soap
Xml messaging with soapXml messaging with soap
Xml messaging with soapJohnny Pork
 
SOAP by luv
SOAP by luvSOAP by luv
SOAP by luvaligarhking
 
Soa 10 soa technology soap
Soa 10 soa technology soapSoa 10 soa technology soap
Soa 10 soa technology soapVaibhav Khanna
 
Web-Services!.pptx
Web-Services!.pptxWeb-Services!.pptx
Web-Services!.pptxssuserae0316
 

Similar to Lecture 3 soap (20)

0321146182
03211461820321146182
0321146182
 
web programming
web programmingweb programming
web programming
 
WebServices.ppt
WebServices.pptWebServices.ppt
WebServices.ppt
 
Soa business centric and soap basic
Soa business centric and soap basicSoa business centric and soap basic
Soa business centric and soap basic
 
Soap Standard
Soap StandardSoap Standard
Soap Standard
 
Introduction to WebServices
Introduction to WebServicesIntroduction to WebServices
Introduction to WebServices
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTC# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENT
 
Mule Webservices
Mule WebservicesMule Webservices
Mule Webservices
 
WebServices Basic Overview
WebServices Basic OverviewWebServices Basic Overview
WebServices Basic Overview
 
WebServices Basic Overview
WebServices Basic OverviewWebServices Basic Overview
WebServices Basic Overview
 
Java Web Service - Summer 2004
Java Web Service - Summer 2004Java Web Service - Summer 2004
Java Web Service - Summer 2004
 
SOAP WEB TECHNOLOGIES
SOAP WEB TECHNOLOGIESSOAP WEB TECHNOLOGIES
SOAP WEB TECHNOLOGIES
 
Xml messaging with soap
Xml messaging with soapXml messaging with soap
Xml messaging with soap
 
Xml Messaging With Soap
Xml Messaging With SoapXml Messaging With Soap
Xml Messaging With Soap
 
Xml messaging with soap
Xml messaging with soapXml messaging with soap
Xml messaging with soap
 
Xml+messaging+with+soap
Xml+messaging+with+soapXml+messaging+with+soap
Xml+messaging+with+soap
 
SOAP by luv
SOAP by luvSOAP by luv
SOAP by luv
 
Soap
SoapSoap
Soap
 
Soa 10 soa technology soap
Soa 10 soa technology soapSoa 10 soa technology soap
Soa 10 soa technology soap
 
Web-Services!.pptx
Web-Services!.pptxWeb-Services!.pptx
Web-Services!.pptx
 

Recently uploaded

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

Lecture 3 soap

  • 1. WebServices: Principles&Technology Slide 4.1 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 Mike P. Papazoglou mikep@uvt.nl Chapter 4 SOAP: Simple Object Access Protocol
  • 2. Slide 4.2 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 Topics •• Inter application communicationInter application communication •• SOAP as a messaging protocolSOAP as a messaging protocol •• Structure of a SOAP messageStructure of a SOAP message •• SOAP communication modelSOAP communication model •• SOAP fault messageSOAP fault message •• SOAP over HTTPSOAP over HTTP •• Advantages and disadvantages of SOAPAdvantages and disadvantages of SOAP
  • 3. Slide 4.3 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 Inter-Application Communication • Conventional distributed applications use distributed communication technologies, e.g., CORBA, DCOM, Java/RMI, based on object RPC (ORPC) protocols that attempted to marry object orientation and network protocols. – ORPC request is an identifier or symbolic name that the server could use to locate the target object inside the server process. • Weaknesses – Both ends of the communication link would need to be implemented under the same distributed object model (Java/RMI or CORBA/IIOP) – Difficulty of getting these protocols to work over firewalls or proxy servers, e.g, most firewalls are configured to allow hypertext transfer protocol (HTTP) to pass across, but not IIOP. • To address the problem of overcoming proprietary systems running on heterogeneous infrastructures, Web services rely on SOAP, an XML- based communication protocol for exchanging messages between computers regardless of their operating systems, programming environment or object model framework.
  • 4. Slide 4.4 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 Topics •• Inter application communicationInter application communication •• SOAP as a messaging protocolSOAP as a messaging protocol •• Structure of a SOAP messageStructure of a SOAP message •• SOAP communication modelSOAP communication model •• SOAP fault messageSOAP fault message •• SOAP over HTTPSOAP over HTTP •• Advantages and disadvantages of SOAPAdvantages and disadvantages of SOAP
  • 5. Slide 4.5 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 What is SOAP? • SOAP is the standard messaging protocol used by Web services. SOAP’s primary application is inter application communication. SOAP codifies the use of XML as an encoding scheme for request and response parameters using HTTP as a means for transport. Service providerService requestor Application object (client) Application object (service provider) SOAP-based middleware SOAP-based middleware SOAP messages exchanged on top of, HTTP, SMTP, or other transport Converts procedure calls to/from XML messages sent through HTTP or other protocols.
  • 6. Slide 4.6 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 What is SOAP? (continued) • SOAP covers the following four main areas: – A message format for one-way communication describing how a message can be packed into an XML document. – A description of how a SOAP message should be transported using HTTP (for Web-based interaction) or SMTP (for e-mail-based interaction). – A set of rules that must be followed when processing a SOAP message and a simple classification of the entities involved in processing a SOAP message. – A set of conventions on how to turn an RPC call into a SOAP message and back.
  • 7. Slide 4.7 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 SOAP as a lightweight protocol • SOAP is a lightweight protocol that allows applications to pass messages and data back and forth between disparate systems in a distributed environment enabling remote method invocation. • By lightweight we mean that the SOAP protocol possesses only two fundamental properties. It can: – send and receive HTTP (or other) transport protocol packets, and – process XML messages. • This can be contrasted with the heavyweight protocols such as ORPC protocols.
  • 8. Slide 4.8 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 Distributed messaging using SOAP
  • 9. Slide 4.9 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 Topics •• Inter application communicationInter application communication •• SOAP as a messaging protocolSOAP as a messaging protocol •• Structure of a SOAP messageStructure of a SOAP message •• SOAP communication modelSOAP communication model •• SOAP fault messageSOAP fault message •• SOAP over HTTPSOAP over HTTP •• Advantages and disadvantages of SOAPAdvantages and disadvantages of SOAP
  • 10. Slide 4.10 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 SOAP messages • SOAP is based on message exchanges. • Messages are seen as envelopes where the application encloses the data to be sent. • A SOAP message consists of an <Envelope> element containing an optional <Header> and a mandatory <Body> element. • The contents of these elements are application defined and not a part of the SOAP specification. • A SOAP <Header> contains blocks of information relevant to how the message is to be processed. This helps pass information in SOAP messages that is not for the application but for the SOAP engine • The SOAP <Body> is where the main end- to-end information conveyed in a SOAP message must be carried. SOAP envelope SOAP header header block SOAP body body block
  • 11. Slide 4.11 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 <env:Envelope xmlns:env=“http://www.w3.org/2003/05/soap-envelope” env:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”> …… </env:Envelope> <env:Envelope xmlns:env=“http://www.w3.org/2003/05/soap-envelope” > … <env:Header> <tx:transaction-id xmlns:tx=”http://www.transaction.com/transaction” env:mustUnderstand=”true”> 512 </tx:transaction-id> <notary:token xmlns:notary=”http://www.notarization-services.com/token” env:mustUnderstand=”true”> GRAAL-5YF3 </notary:token> </env:Header> …………… </env:Envelope> Example of SOAP envelope Example of SOAP header SOAP envelope and header
  • 12. Slide 4.12 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 SOAP Intermediaries • SOAP headers have been designed in anticipation of participation of other SOAP processing nodes – called SOAP intermediaries – along a message's path from an initial SOAP sender to an ultimate SOAP receiver. • A SOAP message travels along the message path from a sender to a receiver. • All SOAP messages start with an initial sender, which creates the SOAP message, and end with an ultimate receiver.
  • 13. Slide 4.13 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 <?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:env=“http://www.w3.org/2003/05/soap-envelope”> <env:Header> <m:order xmlns:m="http://www.plastics_supply.com/purchase-order" env:role="http://www.w3.org/2003/05/soap- envelope/role/next" env:mustUnderstand="true"> <m:order-no >uuid:0411a2daa</m:order-no> <m:date>2004-11-8</m:date> </m:order> <n:customer xmlns:n="http://www.supply.com/customers" env:role="http://www.w3.org/2003/05/soap- envelope/role/next" env:mustUnderstand="true"> <n:name> Marvin Sanders </n:name> </n:customer > </env:Header> <env:Body> <-- Payload element goes here --> </env:Body> </env:Envelope> Example of SOAP header with message routing The “next” role is one that all SOAP nodes are required to support; By tagging each header in this message with the “next” role, this message is saying that all SOAP nodes (intermediaries and the ultimate receiver) MUST understand and be able to process the m:order header and the n:customer header.
  • 14. Slide 4.14 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 The SOAP Body • The SOAP body is the area of the SOAP message, where the application specific XML data (payload) being exchanged in the message is placed. • The <Body> element must be present and is an immediate child of the envelope. It may contain a number of child elements, called body entries, but it may also be empty. The <Body> element contains either of the following: – Application-specific data: is the information that is exchanged with a Web service. The SOAP <Body> is where the method call information and its related arguments are encoded. It is where the response to a method call is placed, and where error information can be stored. – fault message: is used only when an error occurs. • A SOAP message may carry either application-specific data or a fault, but not both.
  • 15. Slide 4.15 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 Example SOAP Message <?xml version='1.0' ?> <env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope" > <env:Header> <t:transactionID xmlns:t="http://intermediary.example.com/procurement" env:role="http://www.w3.org/2002/06/soap-envelope/role/next" env:mustUnderstand="true" > 57539 </t:transactionID> </env:Header> <env:Body> <m:orderGoods env:encodingStyle="http://www.w3.org/2002/06/soap-encoding" xmlns:m="http://example.com/procurement"> <m:productItem> <name>ACME Softener</name> </m:productItem> <m:quantity> 35 </m:quantity> </m:orderGoods> </env:Body> </env:Envelope> Header Body Blocks Envelope
  • 16. Slide 4.16 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 Topics •• Inter application communicationInter application communication •• SOAP as a messaging protocolSOAP as a messaging protocol •• Structure of a SOAP messageStructure of a SOAP message •• SOAP communication modelSOAP communication model •• SOAP fault messageSOAP fault message •• SOAP over HTTPSOAP over HTTP •• Advantages and disadvantages of SOAPAdvantages and disadvantages of SOAP
  • 17. Slide 4.17 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 The SOAP Communication Model • SOAP supports two possible communication styles: – remote procedure call (RPC) and – document (or message). RPC-style interaction Document-style interaction
  • 18. Slide 4.18 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 RPC-style SOAP Services • A remote procedure call (RPC)-style Web service appears as a remote object to a client application. The interaction between a client and an RPC-style Web service centers around a service-specific interface. Clients express their request as a method call with a set of arguments, which returns a response containing a return value. SOAP envelope SOAP body Method name orderGoods Input parameter 1 product item Input parameter 2 quantity SOAP envelope SOAP body Method return Return value order id
  • 19. Slide 4.19 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 <env:Envelope xmlns:SOAP=“http://www.w3.org/2003/05/soap-envelope” xmlns:m="http://www.plastics_supply.com/product-prices"> <env:Header> <tx:Transaction-id xmlns:t=”http://www.transaction.com/transactions” env:mustUnderstand='1'> 512 </tx:Transaction-id> </env:Header> <env:Body> <m:GetProductPrice> <product-id> 450R6OP </product-id > </m:GetProductPrice > </env:Body> </env:Envelope> <env:Envelope xmlns:SOAP=“http://www.w3.org/2003/05/soap-envelope” xmlns:m="http://www.plastics_supply.com/product-prices"> <env:Header> <--! – Optional context information --> </env:Header> <env:Body> <m:GetProductPriceResponse> <product-price> 134.32 </product-price> </m:GetProductPriceResponse> </env:Body> </env:Envelope> Example of RPC-style SOAP body Example of RPC-style SOAP response message RPC-style web services
  • 20. Slide 4.20 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 Document (Message)-style SOAP Services • In the document-style of messaging, the SOAP <Body> contains an XML document fragment. The <Body> element reflects no explicit XML structure. • The SOAP run-time environment accepts the SOAP <Body> element as it stands and hands it over to the application it is destined for unchanged. There may or may not be a response associated with this message. SOAP envelope SOAP body PurchaseOrder document -product item -quantity SOAP envelope SOAP body Acknowledgement document -order id
  • 21. Slide 4.21 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 <env:Envelope xmlns:SOAP=“http://www.w3.org/2003/05/soap-envelope”> <env:Header> <tx:Transaction-id xmlns:t=”http://www.transaction.com/transactions” env:mustUnderstand='1'> 512 </env:Header> <env:Body> <po:PurchaseOrder oderDate=”2004-12-02” xmlns:m="http://www.plastics_supply.com/POs"> <po:from> <po:accountName> RightPlastics </po:accountName> <po:accountNumber> PSC-0343-02 </po:accountNumber> </po:from> <po:to> <po:supplierName> Plastic Supplies Inc. </po:supplierName> <po:supplierAddress> Yara Valley Melbourne </po:supplierAddress> </po:to> <po:product> <po:product-name> injection molder </po:product-name> <po:product-model> G-100T </po:product-model> <po:quantity> 2 </po:quantity> </po:product> </ po:PurchaseOrder > </env:Body> </env:Envelope> Example of document-style SOAP body Example of document-style SOAP body
  • 22. Slide 4.22 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 Topics •• Inter application communicationInter application communication •• SOAP as a messaging protocolSOAP as a messaging protocol •• Structure of a SOAP messageStructure of a SOAP message •• SOAP communication modelSOAP communication model •• SOAP fault messageSOAP fault message •• SOAP over HTTPSOAP over HTTP •• Advantages and disadvantages of SOAPAdvantages and disadvantages of SOAP
  • 23. Slide 4.23 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 SOAP Fault element • SOAP provides a model for handling faults arise. • It distinguishes between the conditions that result in a fault, and the ability to signal that fault to the originator of the faulty message or another node. The SOAP <Body> is the place where fault information is placed. <env:Envelope xmlns:SOAP=“http://www.w3.org/2003/05/soap-envelope” xmlns:m="http://www.plastics_supply.com/product-prices"> <env:Header> <tx:Transaction-id xmlns:t=”http://www.transaction.com/transactions” env:mustUnderstand='1'> 512 </tx:Transaction-id> </env:Header> <env:Body> <env:Fault> <env:Code> <env:Value>env:Sender</env:Value> <env:Subcode> <env:Value> m:InvalidPurchaseOrder </env:Value> </env:Subcode> </env:Code> <env:Reason> <env:Text xml:lang="en-UK"> Specified product did not exist </env:Text> </env:Reason> <env:Detail> <err:myFaultDetails xmlns:err="http://www.plastics_supply.com/faults"> <err:message> Product number contains invalid characters </err:message> <err:errorcode> 129 </err:errorcode> </err:myFaultDetails> </env:Detail> </env:Fault> </env:Body> </env:Envelope>
  • 24. Slide 4.24 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 Topics •• Inter application communicationInter application communication •• SOAP as a messaging protocolSOAP as a messaging protocol •• Structure of a SOAP messageStructure of a SOAP message •• SOAP communication modelSOAP communication model •• SOAP fault messageSOAP fault message •• SOAP over HTTPSOAP over HTTP •• Advantages and disadvantages of SOAPAdvantages and disadvantages of SOAP
  • 25. Slide 4.25 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 SOAP and HTTP  A binding of SOAP to a transport protocol is a description of how a SOAP message is to be sent using that transport protocol.  The typical binding for SOAP is HTTP.  SOAP can use GET or POST. With GET, the request is not a SOAP message but the response is a SOAP message, with POST both request and response are SOAP messages (in version 1.2, version 1.1 mainly considers the use of POST).  SOAP uses the same error and status codes as those used in HTTP so that HTTP responses can be directly interpreted by a SOAP module. SOAP envelope SOAP header Transactional context SOAP body Input parameter 1 Input parameter 2 Name of procedure HTTP POST
  • 26. Slide 4.26 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 RPC call using SOAP over HTTP Service provider SOAP engine Service implementation (other tiers) HTTP engine Service requestor HTTP engine Client implementation (other tiers) SOAP engine SOAP envelope SOAP header Transactional context SOAP body Name of the procedure Input parameter 1 Input parameter 2 HTTP Post SOAP envelope SOAP header transactional context SOAP body return parameter SOAP envelope SOAP header Transactional context SOAP body Return parameter HTTP Post
  • 27. Slide 4.27 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 Topics •• Inter application communicationInter application communication •• SOAP as a messaging protocolSOAP as a messaging protocol •• Structure of a SOAP messageStructure of a SOAP message •• SOAP communication modelSOAP communication model •• SOAP fault messageSOAP fault message •• SOAP over HTTPSOAP over HTTP •• Advantages and disadvantages of SOAPAdvantages and disadvantages of SOAP
  • 28. Slide 4.28 Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008 Advantages and disadvantages of SOAP • Advantages of SOAP are: – Simplicity – Portability – Firewall friendliness – Use of open standards – Interoperability – Universal acceptance. • Disadvantages of SOAP are: – Too much reliance on HTTP – Statelessness – Serialization by value and not by reference. Try not to laugh too hard at this assertion!!!