(^310) CHAPTER 20 ■ ADVANCED WEB SERVICES
Listings 20-11 and 20-12 show the SOAP server and client, respectively.
Listing 20-11. SOAP Server for Transmitting Binary Data (photoservice.php)
class Photo {
function AddPhoto($photo) {
$fileData = base64_decode($photo);
return md5($fileData);
}
}
$server = new SoapServer('photo.wsdl');
$server->setClass("Photo");
$server->handle();
McArthur_819-9.book Page 310 Friday, February 29, 2008 8:03 AM