soap.ppt
TRANSCRIPT
-
8/17/2019 SOAP.ppt
1/29
1
Simple Object Access Protocol
(SOAP)
by Kazi Huque
-
8/17/2019 SOAP.ppt
2/29
2
Presentation Outline
Definition
Motivation
Characteristics
SOAP message format
SOAP in code SOAP Security
SOAP in action
-
8/17/2019 SOAP.ppt
3/29
3
What is SOAP?
SOAP is a lighteight !rotocol intended fore"changing structured information in a
decentralized# distributed environment$ SOAPuses %M& technologies to define an e"tensiblemessaging frameor'# hich !rovides a messageconstruct that can be e"changed over a variety ofunderlying !rotocols$ (he frameor' has beendesigned to be inde!endent of any !articular
!rogramming model and other im!lementation) s!ecific semantics$
-
8/17/2019 SOAP.ppt
4/29
4
SOAP is the Foundation
SOAP
WS-Security
WS-Policy WS-Trust WS-Privacy
WS-SecureConversation WS-Federation WS-Authorization
-
8/17/2019 SOAP.ppt
5/29
5
Simply Put...
SOAP is a ay for a !rogram running in
one o!erating system to communicate ith
a !rogram running in either the same or adifferent o!erating system# using H((P *or
any other trans!ort !rotocol+ and %M&$
-
8/17/2019 SOAP.ppt
6/29
6
SOAP Messaging Frameor!
%M&)based messaging frameor' that is ,+ e"tensible
-+ intero!erable
.+ inde!endent
/e"t e discuss these three characteristics
in more detail
-
8/17/2019 SOAP.ppt
7/29
7
"#tensible
Sim!licity remains one of SOAP0s !rimary
design goals
SOAP defines a communication
frameor' that allos for features such as
security# routing# and reliability to be
added later as layered e"tensions
-
8/17/2019 SOAP.ppt
8/29
8
$nteroperable
SOAP can be used over any trans!ort
!rotocol such as (CP# H((P# SM(P
SOAP !rovides an e"!licit binding today
for H((P
-
8/17/2019 SOAP.ppt
9/29
9
$nteroperable %ont&
-
8/17/2019 SOAP.ppt
10/29
10
$ndependent
SOAP allos for any !rogramming model
and is not tied to 1PC
SOAP defines a model for !rocessing
individual# one)ay messages
SOAP also allos for any number of
message e"change !atterns *M2Ps+
-
8/17/2019 SOAP.ppt
11/29
11
One'Way Message
-
8/17/2019 SOAP.ppt
12/29
12
euest*esponse
-
8/17/2019 SOAP.ppt
13/29
13
SOAP Message Format
SOAP message consists of three !arts3 SOAP 2nvelo!e
SOAP Header *o!tional+
SOAP 4ody
5rom the http://schemas.xmlsoap.org/soap/envelope/
names!ace
-
8/17/2019 SOAP.ppt
14/29
14
SOAP "n+elope
(he SOAP 2nvelo!e construct defines an
overall frameor' for e"!ressing what is
in a message and who should deal ith it$
-
8/17/2019 SOAP.ppt
15/29
15
SOAP "n+elope %ont&
(he 2nvelo!e is the to! element of the
%M& document re!resenting the message$
(he Envelope element is alays the rootelement of a SOAP message$
(he 2nvelo!e element contains an o!tional
Header element folloed by a mandatory Body element$
-
8/17/2019 SOAP.ppt
16/29
16
SOAP "n+elope %ode
6soa!32nvelo!e
"mlns3soa!78htt!399schemas$"mlsoa!$org9soa!9envelo!e98:
6soa!3Header: 6;)) o!tional )):
69soa!3Header:
6soa!34ody:
69soa!34ody:
69soa!32nvelo!e:
-
8/17/2019 SOAP.ppt
17/29
17
SOAP ,eader
(he Header element is a generic container
for control information
-
8/17/2019 SOAP.ppt
18/29
18
SOAP ,eader %ode
6soa!3Header:
6;)) security credentials )):
6s3credentials "mlns3s78urn3e"am!les)org3security8:6username:dave69username:
6!assord:evad69!assord:
69s3credentials:
69soa!3Header:
-
8/17/2019 SOAP.ppt
19/29
19
SOAP -ody
(he 4ody element re!resents the message
!ayload
-
8/17/2019 SOAP.ppt
20/29
20
SOAP -ody %ode
6soa!34ody:
6"3(ransfer5unds "mlns3"78urn3e"am!les)org3ban'ing8:
6from:--).=-=.>69from:
6to:>?)-?.?=.69to:
6amount:,@@$@@69amount:
69"3(ransfer5unds:
69soa!34ody:
-
8/17/2019 SOAP.ppt
21/29
21
SOAP in %ode
SOAP Message 2mbedded in H((P 1equest3
6SOAP)2/32nvelo!e
"mlns3SOAP)2/78htt!399schemas$"mlsoa!$org9soa!9envelo!e98 SOAP2/3encodingStyle78htt!399schemas$"mlsoa!$org9soa!9encoding98:
6SOAP)2/34ody:
6m3Bet&ast(radePrice "mlns3m78Some)1
-
8/17/2019 SOAP.ppt
22/29
22
SOAP in %ode %ont&
SOAP Message 2mbedded in H((P 1es!onse3
6SOAP)2/32nvelo!e "mlns3SOAP)2/78htt!399schemas$"mlsoa!$org9soa!9envelo!e98 SOAP)2/3encodingStyle78htt!399schemas$"mlsoa!$org9soa!9encoding989: 6SOAP)2/34ody: 6m3Bet&ast(radePrice1es!onse "mlns3m78Some)1
-
8/17/2019 SOAP.ppt
23/29
23
SOAP Security
(he SOAP s!ecification does not define
encry!tion for %M& Eeb Services$
(his is left u! to the im!lementer of the
SOAP !rotocol$
-
8/17/2019 SOAP.ppt
24/29
24
$ssues About Security
2ncry!tion !laces a de!endency on the
trans!ort !rotocol
Does the trans!ort !rotocol su!!ort secure
communicationF
Ehat is the cost of encry!ting all the data
versus !art of the dataF
-
8/17/2019 SOAP.ppt
25/29
25
SOAP %ode ith "ncryption
6G EebService &anguage78CI8 Class78CreditCardService8 G:
using System$Eeb$ServicesJ
!ublic class CreditCardService
LEebMethod
L2ncry!tion2"tension*2ncry!t72ncry!tMode$1es!onse+
!ublic string BetCreditCard/umber*+ return 8MC3 =,,,),,,,),,,,),,,,8J
N
N
-
8/17/2019 SOAP.ppt
26/29
-
8/17/2019 SOAP.ppt
27/29
27
esponse "ncrypted
6soa!34ody:
6BetCreditCard/umber "mlns78htt!399tem!uri$org98:
6BetCreditCard/umber1esult:?. ,, -=. .- . > ? ,. ,>@ ,.=
,?? -=, ,>? -@> - ,,= ,-- .? ,?@ .= ,>= ,.? , > --, ,> -.> ? -
,- >= -
69BetCreditCard/umber1esult:
69BetCreditCard/umber:
69soa!34ody:
-
8/17/2019 SOAP.ppt
28/29
28
SOAP in Action
Demo
-
8/17/2019 SOAP.ppt
29/29
29
eerences
nderstanding SOAPOverall e"!lanation of hat SOAP is# and hat it can do$
htt!399msdn$microsoft$com9ebservices9understanding9ebservicebasics9default$as!"F!ull
79library9en)us99dnsoa!9html9understandsoa!$as!
E.C /ote 2"!lains ho SOAP e"changes messages$ Code level
details$
htt!399$.$org9(19-@@@9/O(2)SOAP)-@@@@@?9
http://msdn.microsoft.com/webservices/understanding/webservicebasics/default.aspx?pull=/library/en-us//dnsoap/html/understandsoap.asphttp://msdn.microsoft.com/webservices/understanding/webservicebasics/default.aspx?pull=/library/en-us//dnsoap/html/understandsoap.asphttp://www.w3.org/TR/2000/NOTE-SOAP-20000508/http://www.w3.org/TR/2000/NOTE-SOAP-20000508/http://msdn.microsoft.com/webservices/understanding/webservicebasics/default.aspx?pull=/library/en-us//dnsoap/html/understandsoap.asphttp://msdn.microsoft.com/webservices/understanding/webservicebasics/default.aspx?pull=/library/en-us//dnsoap/html/understandsoap.asp