Bug #78315 [NEW]: Included schemas don't adopt the targetNamespace of includer

From: Date: Sat, 20 Jul 2019 19:36:47 +0000
Subject: Bug #78315 [NEW]: Included schemas don't adopt the targetNamespace of includer
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221869@lists.php.net to get a copy of this message
From: jpleveille at gmail dot com Operating system: Linux PHP version: 7.3.7 Package: SOAP related Bug Type: Bug Bug description:Included schemas don't adopt the targetNamespace of includer Description: ------------ When a schema includes another schema that doesn't declare a namespace (i.e. no xmlns), the included schema does not adopt the targetNamespace of the includer. Short script linked below outputs EXPECTED and ACTUAL result. Although both results are returned by a SOAP client, the EXPECTED output is from an XSD altered with the namespace of the includer (which provides the desired effect, yet defeats the purpose). This impacts the process of marshaling the return value of __soapCall() as content for included types will be missing (as shown in the test script). Tested on Windows (PHP7.3.7) and Linux (PHP7.3.7 and PHP7.2.19) Test script: --------------- https://gist.github.com/webgraphe/d0a665aaad3c827b041eabb9128b62f7 Expected result: ---------------- Running the script from the command line, the output should be: ACTUAL TYPES: struct User { int Amount; string CurrencyCode; } RESPONSE: { "Amount": 123, "CurrencyCode": "USD" } EXPECTED TYPES: struct User { int Amount; string CurrencyCode; } RESPONSE: { "Amount": 123, "CurrencyCode": "USD" } Actual result: -------------- Running the script from the command line, the output actually is: ACTUAL TYPES: struct User { } RESPONSE: {} EXPECTED TYPES: struct User { int Amount; string CurrencyCode; } RESPONSE: { "Amount": 123, "CurrencyCode": "USD" } -- Edit bug report at https://bugs.php.net/bug.php?id=78315&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78315&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78315&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78315&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=78315&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78315&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78315&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78315&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78315&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78315&r=support Expected behavior: https://bugs.php.net/fix.php?id=78315&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78315&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78315&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78315&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78315&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=78315&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78315&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78315&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78315&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78315&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78315&r=mysqlcfg

« previous php.bugs (#221869) next »