Bug #68576 [Opn->Csd]: Namespaces in schema php_schema.c

From: Date: Thu, 29 May 2025 14:56:09 +0000
Subject: Bug #68576 [Opn->Csd]: Namespaces in schema php_schema.c
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-250182@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68576&edit=1 ID: 68576 Updated by: nielsdos@php.net Reported by: r dot eijnden at ibfd dot org Summary: Namespaces in schema php_schema.c -Status: Open +Status: Closed Type: Bug Package: SOAP related Operating System: RHEL5 PHP Version: 5.6.3 -Assigned To: +Assigned To: nielsdos Block user comment: N Private report: N New Comment: Fixed in 8.5-dev Previous Comments: ------------------------------------------------------------------------ [2014-12-09 15:56:24] r dot eijnden at ibfd dot org 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 this bug report at https://bugs.php.net/bug.php?id=68576&edit=1

« previous php.bugs (#250182) next »