Xinclude and php/soap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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");


?>

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux