--TEST--
SOAP typemap 9: SoapServer support for typemap's from_xml() (SoapFault)
--EXTENSIONS--
soap
--INI--
soap.wsdl_cache_enabled=0
--FILE--
foo
bar
";
function book_from_xml($xml) {
throw new SoapFault("Server", "Conversion Failed");
}
class test{
function dotest($book){
$classname=get_class($book);
return "Object: ".$classname. "(".$book->a.",".$book->b.")";
}
}
class book{
public $a="a";
public $b="c";
}
$options=Array(
'actor' =>'http://schemas.nothing.com',
'typemap' => array(array("type_ns" => "http://schemas.nothing.com",
"type_name" => "book",
"from_xml" => "book_from_xml"))
);
$server = new SoapServer(__DIR__."/classmap.wsdl",$options);
$server->setClass("test");
$server->handle($HTTP_RAW_POST_DATA);
echo "ok\n";
?>
--EXPECT--
SOAP-ENV:ServerConversion Failed
ok