Pro PHP- Patterns, Frameworks, Testing and More

(vip2019) #1
CHAPTER 19 ■ INTRODUCTION TO WEB SERVICES WITH SOAP^297

}

}

["TotalResults"]=>
int(1)
["TotalPages"]=>
int(1)
["Item"]=>
object(stdClass)#11 (3) {
["ASIN"]=>
string(10) "1590598199"
["DetailPageURL"]=>
string(173) "http://www.amazon.com/gp/redirect.html..."
["ItemAttributes"]=>
object(stdClass)#12 (4) {
["Author"]=>
string(14) "Kevin McArthur"
["Manufacturer"]=>
string(6) "Apress"
["ProductGroup"]=>
string(4) "Book"
["Title"]=>
string(53) "Pro PHP: Patterns, Frameworks, Testing and More (Pro)"
}
}
}
}

You can then extract this information using standard object notation. For example, to get
the book title, use $request->Items->Item->ItemAttributes->Title.
This API offers a lot of power, which is also true of many other APIs from other vendors. For
example, ESRI (a geographic information system developer) offers a tremendous amount of
commercial information through its ArcWeb SOAP services.

Just the Facts


In this chapter, you were introduced to the basics of WSDL, SOAP messaging, and the PHP
SOAP extension.
A WSDL file contains types, messages, operations, port types, bindings, ports, and services.
SOAP messaging takes the form of an RPC request. The SOAP extension generates
different request and response envelopes during operation.
The PHP SOAP extension provides the classes SoapClient and SoapServer, which offer many
methods and options for controlling the use of web services.
In the next chapter, you will learn about some of the more advanced topics that affect the
development of web services, such as persistence, authentication, and complex types.

McArthur_819-9.book Page 297 Friday, February 29, 2008 8:03 AM

Free download pdf