PhpRiot
Follow phpriot on Twitter
Sponsored Link
Download Article
Download this article or the entire “Zend Framework 101” series with all listings and files.




More information
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store
Free iPad/iPhone App
Available on the App Store

  • PHP manual
  • Zend Framework manual
  • Smarty manual
  • PHP articles
  • PHP training

Related Books
PHP Solutions: Dynamic Web Design Made Easy

PHP Solutions: Dynamic Web Design Made Easy

This is the second edition of David Power's highly-respected PHP Solutions: Dynamic Web Design...

PHP for the World Wide Web, Third Edition

PHP for the World Wide Web, Third Edition

With PHP for the World Wide Web, Third Edition: Visual QuickStart Guide , readers can start from...

Zend Framework 101: Zend_Soap

Further Improvements

As stated previously, this is a somewhat simplified implementation of web services. There are several things you can add to make this a more advanced implementation. These may include:

  • Complex data types, such as arrays and objects.
  • Type mapping (automatically mapping SOAP data types to local PHP classes on both the server and client). This allows easier manipulation of data passed to and returned from web service calls.
  • Authentication. There are two levels of authentication: one to protect who can access the web service directly, and the second is to let users authenticate via a web service so they receive an elevated level of access.
  • Error handling. We can't always assume data passed to web service calls is valid. The server needs the ability to send errors, and clients need to be able to detect errors and handle them accordingly.
  • Caching. Since every call to a web service can potentially be quite expensive (in terms of time and processing power), it can be extremely beneficial to implement a caching mechanism that allows you re-use the response from web service calls without having to communicate with the SOAP server.
  • WSDL file caching. In this article I haven't covered anything to do with caching of WSDL files. By default, the server and client will cache these files, but you can control this behaviour when instantiating Zend_Soap_Server and Zend_Soap_Client.

Hopefully in an upcoming article I will cover each of these aspects.

In This Article