// This demonstrates the usage of the servers extension. It requires the // PhpWsdl framework files to be in the same folder as this file. // Load PhpWsdl require_once 'class.phpwsdl.php'; // Load the servers extension, if PhpWsdl could not do it // (because the "glob" function may be disabled in your PHP installation) // If "glob" is working, you don't need those lines: if (!class_exists('PhpWsdlServers')) { require_once 'class.phpwsdl.servers.php'; } if (!class_exists('PhpWsdlJavaScriptPacker')) { require_once 'class.phpwsdl.servers-jspacker.php'; } // This disables response compression (some servers don't support that) PhpWsdlServers::$EnableCompression = false; // This Would disable some servers //PhpWsdlServers::$EnableHttp=false;// Disable the http webservice //PhpWsdlServers::$EnableJson=false;// Disable the JSON webservice //PhpWsdlServers::$EnableRest=false;// Disable the REST webservice //PhpWsdlServers::$EnableRpc=false;// Disable the XML RPC webservice // This would enable the client cache //PhpWsdlServers::$DisableClientCache=false; // This would enable named parameters for a XML RPC client //PhpWsdlServers::$EnableRpcNamedParameters=true; // This would enable attaching the JavaScript clients to the PDF documentation //PhpWsdlServers::$AttachJsInPdf=true; // Run the PhpWsdl server in quick mode /*PhpWsdl::$Debugging=true; PhpWsdl::$DebugFile=PhpWsdl::$CacheFolder.'/debug.log';*/ PhpWsdl::RunQuickMode(array('class.soapdemo.php', 'class.complextypedemo.php'));
/** * Attach the PHP client sources * * @param array $data The event data * @return boolean Response */ public static function PdfAttachmentHook($data) { $temp =& $data['param']; $cnt =& $data['cnt']; $server = $data['server']; if (self::$EnableJson) { if (!$server->ForceNotOutputJsonPhp) { $cnt++; $temp['attachment_' . $cnt] = $server->Name . '.jsonclient.php:' . self::$UseServer->GetJsonPhpUri(); } if (self::$AttachJsInPdf && !$server->ForceNotOutputJsonJs) { $cnt++; $temp['attachment_' . $cnt] = $server->Name . '.jsonclient.js:' . self::$UseServer->GetJsonJsUri(); if (self::IsJsPackerAvailable()) { $cnt++; $temp['attachment_' . $cnt] = $server->Name . '.jsonclient.min.js:' . self::$UseServer->GetJsonJsUri() . '&min'; } } } if (self::$EnableRpc && !$server->ForceNotOutputRpcPhp) { $cnt++; $temp['attachment_' . $cnt] = $server->Name . '.xmlrpcclient.php:' . self::$UseServer->GetRpcPhpUri(); } if (self::$EnableHttp && !$server->ForceNotOutputHttpPhp) { $cnt++; $temp['attachment_' . $cnt] = $server->Name . '.httpclient.php:' . self::$UseServer->GetHttpPhpUri(); } if (self::$EnableRest && !$server->ForceNotOutputRestPhp) { $cnt++; $temp['attachment_' . $cnt] = $server->Name . '.restclient.php:' . self::$UseServer->GetRestPhpUri(); } return true; }