#48570 [NEW]: SubstitutionGroup in XML schema not supported
| From: | sjoerd-php at linuxonly dot nl | Date: | Tue, 16 Jun 2009 18:40:12 +0000 |
| Subject: | #48570 [NEW]: SubstitutionGroup in XML schema not supported | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-138370@lists.php.net to get a copy of this message | ||
From: sjoerd-php at linuxonly dot nl
Operating system: Linux 2.6.28 Ubuntu 9.0.4
PHP version: 5.2.9
PHP Bug Type: SOAP related
Bug description: SubstitutionGroup in XML schema not supported
Description:
------------
Elements in a XML schema (XSD) may have a substitutionGroup attribute
which indicates that this element may be used instead of an other element.
When an element with a substitutionGroup is defined in the schema part of
the WSDL and the endpoint returns a substitution instead of the original
element, the SoapClient does not deserialize the XML and returns nothing.
Reproduce code:
---------------
Part of WSDL:
<xsd:element name="originalElement" type="xsd:string" />
<xsd:element name="substitutionElement"
substitutionGroup="tns:originalElement" type="xsd:string" />
MySoapMethod returns a originalElement.
Returned XML:
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<!-- Instead of originalElement, we return substitutionElement. It should
make no difference. -->
<substitutionElement>bla</substitutionElement>
</soapenv:Body>
</soapenv:Envelope>
In PHP, call method and expect "bla" to be returned:
echo $client->MySoapMethod();
Expected result:
----------------
Because in the example substitutionElement can be used instead of
originalElement, I expect the contents of substitutionElement to be
returned if there is no originalElement.
Actual result:
--------------
An empty string is returned, if there is no originalElement.
--
Edit bug report at http://bugs.php.net/?id=48570&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48570&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48570&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48570&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48570&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48570&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48570&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48570&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48570&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48570&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48570&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48570&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48570&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48570&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48570&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48570&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48570&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48570&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48570&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48570&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48570&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48570&r=mysqlcfg