IsWsdlRequested()) $soap->Optimize=false; // Don't optimize WSDL to send it human readable to the browser $soap->RunServer( // Finally, run the server and enable the proxy null, Array( // Use an array for this parameter to enable the proxy: 'SoapDemo', // The name of the target class that will handle SOAP requests new SoapDemo() // An instance of the target class that will handle SOAP requests ) ); /** * This is how to define a global method for WSDL * * @return string Response * @pw_set global=1 -> Tell PhpWsdl to serve this as global method (outside of a class) */ function GlobalMethodDemo(){ return utf8_encode('Response of the global method demo'); } // If you want PhpWsdl to handle all methods as global per default, set the // PhpWsdlMethod::$IsGlobalDefault to TRUE. Then you don't need to set the // setting "global" to "1" for every method.