Bug #73043 [NEW]: WSDL: import schema if WSDL uri does NOT end with a slash
From: filip dot rydlo at gmail dot com
Operating system: Debian 8.5 Jessie x64
PHP version: 5.6.26RC1
Package: SOAP related
Bug Type: Bug
Bug description:WSDL: import schema if WSDL uri does NOT end with a slash
Description:
------------
When loading WSDL:
PHP SoapClient FAILs to find *.XSD files despite the fact that they are
properly defined in the WSDL file downloaded from the server. They are
defined like this:
<wsdl:definitions ...
...
<wsdl:types>
<xsd:schema>
<xsd:import namespace="http://fs.mfcr.cz/eet/schema/v3"
schemaLocation="EETXMLSchema.xsd"/>
</xsd:schema>
</wsdl:types>
...
WSDL addr. : https://pg.eet.cz/eet/services/EETServiceSOAP/v3?wsdl
Test script:
---------------
<?php
define('WSDL',
'https://pg.eet.cz:443/eet/services/EETServiceSOAP/v3?wsdl');
// EET
srvr NETOLERUJE koncove '/' za "v3"!!!
define('ENDPOINT_LOCATION',
'https://pg.eet.cz:443/eet/services/EETServiceSOAP/v3/');
// NETOLERUJE
koncove '/', bacha!
$options= array(
'cache_wsdl' => WSDL_CACHE_NONE,
'encoding' => 'utf-8',
'soap_version' => SOAP_1_1,
'exceptions' => true,
'trace' => 1,
'location' => ENDPOINT_LOCATION
);
$test_msg= "<EmptyTest>NODATA</EmptyTest>";
$input_args= new SoapVar($test_msg, XSD_ANYXML);
try
{
xdebug_disable();
//-------------------------------------
$soap= new SoapClient(WSDL, $options);
//-------------------------------------
xdebug_enable();
xdebug_disable();
$out = $soap->__soapCall('OdeslaniTrzby', array($input_args),
$options, null, $output_headers);
xdebug_enable();
echo("<br />REQUEST :<br />".
htmlspecialchars($eet->__getLastRequest()) ."<br />");
echo("<br />RESPONSE:<br />".
htmlspecialchars($eet->__getLastResponse()) ."<br />");
}
catch (SoapFault $fault)
{
xdebug_enable();
echo "Error:<br />" . nl2br($fault->faultcode) . '<br /><br
/>Error Details:<br />'. nl2br($fault->faultstring) . '<br />';
}
Expected result:
----------------
REQUEST : <dumped-xml-request..........>
In short:
It should successfully import the XSD schema from the correct location -
DESPITE the webservice location does NOT end with a slash "/".
In short: It should have looked for it here:
https://pg.eet.cz:443/eet/services/EETServiceSOAP/v3/EETXMLSchema.xsd
NOT here:
https://pg.eet.cz:443/eet/services/EETServiceSOAP/EETXMLSchema.xsd
Actual result:
--------------
PHP Fatal error: SOAP-ERROR: Parsing Schema: can't import schema from
'https://pg.eet.cz:443/eet/services/EETServiceSOAP/EETXMLSchema.xsd'
in
/home/username/EET/src/testscript.php on line 21
Error:
WSDL
Error Details:
SOAP-ERROR: Parsing Schema: can't import schema from
'https://pg.eet.cz:443/eet/services/EETServiceSOAP/EETXMLSchema.xsd'
--
Edit bug report at https://bugs.php.net/bug.php?id=73043&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73043&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73043&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73043&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73043&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73043&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73043&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73043&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73043&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73043&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73043&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73043&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73043&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73043&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73043&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73043&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73043&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73043&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73043&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73043&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73043&r=mysqlcfg
Thread (10 messages)
- filip dot rydlo at gmail dot com