--TEST-- SOAP Typemap 7: SoapClient support for typemap's from_xml() (without WSDL) --SKIPIF-- --INI-- soap.wsdl_cache_enabled=0 --FILE-- foo bar EOF; } } class book{ public $a="a"; public $b="c"; } function book_from_xml($xml) { $sxe = simplexml_load_string($xml); $obj = new book; $obj->a = (string)$sxe->a; $obj->b = (string)$sxe->b; return $obj; } $options=Array( 'uri' => 'http://schemas.nothing.com', 'location' => 'test://', 'actor' => 'http://schemas.nothing.com', 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", "type_name" => "book", "from_xml" => "book_from_xml")) ); $client = new TestSoapClient(NULL, $options); $ret = $client->dotest2("???"); var_dump($ret); echo "ok\n"; ?> --EXPECTF-- object(book)#%d (2) { ["a"]=> string(3) "foo" ["b"]=> string(3) "bar" } ok