Creating a Web Service
The PHP code for the Getnewpolicyinfo Web service is a thin wrapper that examines the type of policy report required and invokes the appropriate stored procedure. The value returned by the stored procedure is then sent back to the client (see Listing 7). Note how simple it is to create a Web service in PHP. The last three rows this feature is exposed as a Web service. A WEB service can be invoked on any client, including in a PHP application, as shown in Listing 8.
Conclusion
In the past few years, XML support has matured across the application tiers, leading to the emergence of a powerful development environment that can change the way enterprise applications are designed. XML enables developers to define rules and structures for business documents, as well as to instantiate documents in memory as layered objects, and developers can navigate, modify, and serialize such objects using standard APIs at any level. Ajax enables web-based client scripts to invoke the DOM API, as well as remote procedure calls to the middle tier. PHP provides one of the easiest ways to process XML and WEB services, so it is ideal for xml-based application development. The last strand of XML evolution is the database layer. DB2 9 enables the database layer to manipulate XML. So this evolution cycle is over.