Page 258 - Using MIS
P. 258
226 Chapter 6 The Cloud
Figure 6-15a
Example XML Document
{
"rstName": "Kelly",
"lastName": "Summers",
"dob": "12/28/1985",
"address":{
"streetAddress": "309 Elm Avenue",
"city": "San Diego",
"state": "CA",
"postalCode": "98225"
},
"phoneNumber": [
{
"type": "home",
"number": "685 5551234"
},
{
"type": "cell",
"number": "685 5555678"
}
Figure 6-15b ]
Example JSON Document }
Service authors (computer programmers) create WSDL documents to describe the services
they provide and the inputs and outputs required. These WSDL documents are seldom read by
humans. Instead, developer tools like Microsoft Visual Studio read the WSDL to configure the
programming environment for programmers who write code to access that service.
As shown in Figure 6-14, SOAP, which is not an acronym though it looks like one, is a proto-
col that sits on top of http and the lower-level Internet protocols. Sits on top of means that it uses
http to send and receive SOAP messages. (SOAP can also use smtp.) Programs that use Web ser-
vices issue SOAP messages to request services; the Web service uses SOAP messages to return
responses to service requests.
Finally, XML and JSON are ways of marking up documents so that both the service re-
questor and the service provider know what data they’re processing. Figure 6-15 shows a
simple example of both. As you can see, XML documents contain as much metadata as they
do application data. These metadata are used to ensure that the document is complete and
properly formatted. XML is used when relatively few messages are being transmitted and when
ensuring a complete and correct document is crucial. Both WSDLs and SOAP messages are
coded in XML.