php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43464 Using 'soapenc:array' instead of 'soapenc:Array' in WSDL doc causes timeout
Submitted: 2007-11-30 11:20 UTC Modified: 2009-05-06 01:00 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: andrew at is dot co dot za Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.2.5 OS: Fedora Core release 6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: andrew at is dot co dot za
New email:
PHP Version: OS:

 

 [2007-11-30 11:20 UTC] andrew at is dot co dot za
Description:
------------
The server.php script shown below fails with a 'PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/html/server.php on line 9' when executed with the supplied soaptest.wsdl file.

However, if you edit soaptest.wsdl and replace 'soapenc:array' with 'soapenc:Array' (i.e., change the lower case 'a' to an upper case 'A'), then the script executes correctly.

The first case should at least return an error, rather than seemingly causing the server to enter an infinite loop.

Reproduce code:
---------------
server.php:

<?php
class SOAPTest {
        public function GetArray() {
                return array('one', 'two', 'three');
        }
}
$server = new SoapServer(dirname(__FILE__) . '/soaptest.wsdl');
$server->setClass('SOAPTest');
$server->handle();
?>

client.php:

<?php
$client = new SoapClient(dirname(__FILE__) . '/soaptest.wsdl', array('exceptions' => false));
header('Content-Type: text/plain');
$ret = $client->GetArray();
if (is_soap_fault($ret))
        echo "SOAP Fault: " . $ret->faultstring;
else
        var_dump($ret);
?>

soaptest.wsdl:

<?xml version="1.0"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:SOAPTest" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="urn:SOAPTest">
  <types>
    <xsd:schema targetNamespace="urn:SOAPTest">
      <xsd:complexType name="ArrayOfString">
        <xsd:complexContent>
          <xsd:restriction base="soapenc:array">
            <xsd:attribute ref="soapenc:arrayType" arrayType="xsd:string[]"/>
          </xsd:restriction>
        </xsd:complexContent>
      </xsd:complexType>
    </xsd:schema>
  </types>
  <message name="GetArrayInput"/>
  <message name="GetArrayOutput">
    <part name="return" type="tns:ArrayOfString"/>
  </message>
  <portType name="SOAPTestPortType">
    <operation name="GetArray">
      <input message="tns:GetArrayInput"/>
      <output message="tns:GetArrayOutput"/>
    </operation>
  </portType>
  <binding name="SOAPTestBinding" type="tns:SOAPTestPortType">
    <soap:binding xmlns="http://schemas.xmlsoap.org/wsdl/soap/" style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/" name="GetArray">
      <input xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/">
        <soap:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:SOAPTest"/>
      </input>
      <output xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/">
        <soap:body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:SOAPTest"/>
      </output>
    </operation>
  </binding>
  <service name="SOAPTestService">
    <port xmlns:default="http://schemas.xmlsoap.org/wsdl/soap/" name="SOAPTestPort" binding="tns:SOAPTestBinding">
      <soap:address xmlns="http://schemas.xmlsoap.org/wsdl/soap/" location="http://localhost/server.php"/>
    </port>
  </service>
</definitions>

Expected result:
----------------
array(3) {
  [0]=>
  string(3) "one"
  [1]=>
  string(3) "two"
  [2]=>
  string(5) "three"
}

Actual result:
--------------
SOAP Fault: Maximum execution time of 30 seconds exceeded

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-02 14:31 UTC] david dot chanial at gmail dot com
Yes, I confirm this bug.

How to demonstrate it with strace :
http://www.craigbrasssystems.com/forum/index.php?showtopic=107&st=0#entry158

Please correct it :)

Best regards,
-- 
DaviXX
 [2009-04-28 18:34 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-05-06 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 05:01:28 2024 UTC