Bug #68576 [NEW]: Namespaces in schema php_schema.c

From: Date: Tue, 09 Dec 2014 15:56:25 +0000
Subject: Bug #68576 [NEW]: Namespaces in schema php_schema.c
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188977@lists.php.net to get a copy of this message
From: r dot eijnden at ibfd dot org Operating system: RHEL5 PHP version: 5.6.3 Package: SOAP related Bug Type: Bug Bug description:Namespaces in schema php_schema.c Description: ------------ The schema parser in the soap extention (php_schema.c) gets confused over type attributes when these are used by multiple namespaces. In the below example WSDL the db:type attribute in the element named 'ITEM_NUMBER' causes a SOAP ERROR because the parser confuses it with a schema type. I think this is caused by 'get_attribute' , which is defined in php_xml.h as #define get_attribute(node, name) get_attribute_ex(node, name, NULL) A possible fix would be to replace all appropriate get_attribute(a,b) calls in php_schema.c with get_attribute_ex(a,b,SCHEMA_NAMESPACE) Example WSDL <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:db="http://xmlns.oracle.com/apps/fnd/soaprovider/plsql/xxxoraws/w_orderws/" targetNamespace="http://xmlns.oracle.com/apps/fnd/soaprovider/plsql/xxxoraws/w_orderws/" elementFormDefault="qualified"> <complexType name="APPS.XXXORAWS_T_ORDEX9143292X1X11"> <sequence> <element name="ITEM_NUMBER" db:type="VARCHAR2" minOccurs="0" nillable="true"> <simpleType> <restriction base="string"> <maxLength value="40"/> </restriction> </simpleType> </element> </sequence> </complexType> </schema> Test script: --------------- $x = new SoapClient('mywsdl.xml', array("trace"=>1,"exceptions"=>0,"features"=>0)); Expected result: ---------------- No output. Actual result: -------------- PHP Fatal error: SOAP-ERROR: element <simpleType> has both 'type' attribute and subtype in mytest.php on line 2 -- Edit bug report at https://bugs.php.net/bug.php?id=68576&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68576&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68576&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68576&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68576&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68576&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68576&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68576&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68576&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68576&r=support Expected behavior: https://bugs.php.net/fix.php?id=68576&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68576&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68576&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68576&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68576&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68576&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68576&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68576&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68576&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68576&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68576&r=mysqlcfg

« previous php.bugs (#188977) next »