php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68576 Namespaces in schema php_schema.c
Submitted: 2014-12-09 15:56 UTC Modified: -
Votes:13
Avg. Score:4.5 ± 0.7
Reproduced:13 of 13 (100.0%)
Same Version:8 (61.5%)
Same OS:3 (23.1%)
From: r dot eijnden at ibfd dot org Assigned:
Status: Open Package: SOAP related
PHP Version: 5.6.3 OS: RHEL5
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: r dot eijnden at ibfd dot org
New email:
PHP Version: OS:

 

 [2014-12-09 15:56 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 04:01:28 2024 UTC