zeproduct'; ini_set('soap.wsdl_cache_enabled', 0); $classmap = include('types.inc.php'); function whatever($name) { $foo = new MyFoo(); $foo->name = $name; $bar = new MyBar(); $bar->id = time(); $bar->description = "Candy Bar"; // without this line, it works even with classmaps enabled $foo->bar = $bar; return $foo; } // with the classmap, a crash will occur // $s = new SoapServer('test.wsdl', array('classmap' => $classmap)); // without it, all is fine $s = new SoapServer('test.wsdl'); $s->addFunction('whatever'); // to call server.php directly, use this line // $s->handle($request); // to call via client.php, use this line $s->handle(file_get_contents('php://input')); ?>