--TEST-- SOAP typemap 6: SoapServer support for typemap's to_xml() (without WSDL, using SoapVar) --SKIPIF-- --INI-- soap.wsdl_cache_enabled=0 --FILE-- ??? "; function book_to_xml($book) { return ''.$book->a.'!'.$book->b.'!'; } class test{ function dotest2($str){ $book = new book; $book->a = "foo"; $book->b = "bar"; return new SoapVar($book, null, "book", "http://schemas.nothing.com"); } } class book{ public $a="a"; public $b="c"; } $options=Array( 'uri' => "http://schemas.nothing.com", 'actor' => 'http://schemas.nothing.com', 'typemap' => array(array("type_ns" => "http://schemas.nothing.com", "type_name" => "book", "to_xml" => "book_to_xml")) ); $server = new SoapServer(NULL,$options); $server->setClass("test"); $server->handle($HTTP_RAW_POST_DATA); echo "ok\n"; ?> --EXPECT-- foo!bar! ok