Xinclude and php/soap

From: Date: Wed, 01 Dec 2004 13:44:13 +0000
Subject: Xinclude and php/soap
Groups: php.soap 
Request: Send a blank email to php-soap+get-1665@lists.php.net to get a copy of this message
Does any one knows if it is possible to use Xinclude into wsdl files to import a schema into the type element ? a client which does var_dump($client->__getTypes()) gives defined elements as types when the schema is directly embedded into the wsdl but gives no types when Xinclude is used. Any idea or suggestion about this problem would be greatly appreciated. -- Philippe -- wsdl sample --------------------------------------------------------------------- -------------- <?xml version ='1.0' encoding ='UTF-8' ?> <definitions name='connectDefinitions' targetNamespace="http://www.example.org" xmlns:tns="http://www.example.org" xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:xi="http://www.w3.org/2001/XInclude" > <types> <xi:include href="soap23_1.xsd"/> </types> <message name='connectSoapIn'> <part name='connectRequest' element='tns:connectRequest'/> </message> <message name='connectSoapOut'> <part name='connectResponse' element='tns:connectResponse'/> </message> ... output without Xinclude ------------------------------------------------------------------- -------- # php -q client23b.php functions<BR> array(3) { [0]=> string(55) "connectResponse connect(connectRequest $connectRequest)" } types:<BR> array(2) { [0]=> string(58) "struct connectRequest { string login; string password; }" [1]=> string(83) "struct connectResponse { boolean successfull; string secToken; string message; }" } <BR> output with Xinclude ------------------------------------------------------------------- ---------- # php -q client23b.php functions<BR> array(3) { [0]=> string(40) "UNKNOWN connect(UNKNOWN $connectRequest)" } types:<BR> array(0) { } <BR> client code ----------------------------------------------------------------------- --------------- <?php ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache $client_1 = new SoapClient("soap23_1.wsdl", Array('soap_version'=>SOAP_1_2, 'trace'=>1)); echo("functions<BR>\n"); var_dump($client_1->__getFunctions()); echo("types:<BR>\n"); var_dump($client_1->__getTypes()); echo("<BR>\n"); ?>

« previous php.soap (#1665) next »