From: pgiralt at cisco dot com Operating system: Ubuntu Linux 8.04 PHP version: 5.2.6 PHP Bug Type: SOAP related Bug description: SOAP does not handle unbounded sequence of elements
Description: ------------ When an XSD file contains a sequence like this: <xsd:complexType name="XMediaResourceGroup"> <xsd:sequence minOccurs="0"> <xsd:element name="name" type="axl:String50"/> <xsd:element name="description" type="axl:String50" minOccurs="0"/> <xsd:element name="multicast" type="xsd:boolean"/> <xsd:element name="members"> <xsd:complexType> <xsd:sequence> <xsd:element name="member" type="axl:XMediaResourceGroupMember" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> <xsd:attribute name="uuid" type="axl:XUUID"/> </xsd:complexType> <xsd:complexType name="XMediaResourceListMember"> <xsd:choice> <xsd:element name="mediaResourceGroup" type="axl:XMediaResourceGroup"> <xsd:annotation> <xsd:documentation>Only the uuid attribute is read by the AXL API.</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="mediaResourceGroupName" type="axl:String50"/> </xsd:choice> <xsd:attribute name="uuid" type="axl:XUUID"/> <xsd:attribute name="order" type="xsd:nonNegativeInteger"/> </xsd:complexType> When I include the array of members for the sequence in the type XMediaResourceGroup, the PHP SOAP does not send the sequence. See below for expected and actual results. I have confirmed this works in 5.2.1 and is broken in 5.2.3, 5.2.4, and 5.2.6. I am unable to test with 5.2.2 or 5.2.5. The problem reported in 42723 seems similar, however that submitter did not appear to describe the problem very well. Reproduce code: --------------- Reproduce code can be downloaded here: http://www.employees.org/~pgiralt/phpbug2/phpbug.tar Once untarred, run axl_test.php to reproduce the problem. Included in the tarball is a directory that contains the SOAP schema (axl60), file that contains a class (axlsoap.php) and the script with the reproduction code (axl_test.php). Expected result: ---------------- POST /axl/ HTTP/1.1 Host: 14.87.10.10:8443 Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.1 Content-Type: text/xml; charset=utf-8 SOAPAction: "addMediaResourceList" Content-Length: 595 <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.cisco.com/AXL/API/1.0"> <SOAP-ENV:Body> <ns1:addMediaResourceList> <mediaResourceList> <name>TestMRGL</name> <members> <member order="1"> <mediaResourceGroupName>Member1</mediaResourceGroupName> </member> <member order="2"> <mediaResourceGroupName>Member2</mediaResourceGroupName> </member> <member order="3"> <mediaResourceGroupName>Member3</mediaResourceGroupName> </member> </members> </mediaResourceList> </ns1:addMediaResourceList> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Actual result: -------------- POST /axl/ HTTP/1.1 Host: 14.87.10.10:8443 Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.6-1ubuntu1 Content-Type: text/xml; charset=utf-8 SOAPAction: "addMediaResourceList" Content-Length: 355 <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.cisco.com/AXL/API/1.0"> <SOAP-ENV:Body> <ns1:addMediaResourceList> <mediaResourceList> <name>TestMRGL</name> <members> <member/> </members> </mediaResourceList> </ns1:addMediaResourceList> </SOAP-ENV:Body> </SOAP-ENV:Envelope> -- Edit bug report at http://bugs.php.net/?id=45284&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45284&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45284&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45284&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45284&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45284&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45284&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45284&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45284&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45284&r=support Expected behavior: http://bugs.php.net/fix.php?id=45284&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45284&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45284&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45284&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45284&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45284&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45284&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45284&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45284&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45284&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45284&r=mysqlcfg