<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=SOAP</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/16688" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16645" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14920" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14854" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14806" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14782" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14756" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14344" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14306" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14065" />
      <rdf:li rdf:resource="http://pear.php.net/bug/13552" />
      <rdf:li rdf:resource="http://pear.php.net/bug/12977" />
      <rdf:li rdf:resource="http://pear.php.net/bug/12349" />
      <rdf:li rdf:resource="http://pear.php.net/bug/11729" />
      <rdf:li rdf:resource="http://pear.php.net/bug/11508" />
      <rdf:li rdf:resource="http://pear.php.net/bug/8086" />
      <rdf:li rdf:resource="http://pear.php.net/bug/7634" />
      <rdf:li rdf:resource="http://pear.php.net/bug/1701" />
      <rdf:li rdf:resource="http://pear.php.net/bug/1404" />
      <rdf:li rdf:resource="http://pear.php.net/bug/1312" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/16688">
      <title>SOAP: Bug 16688 [Open] SOAP_Call with 'raw' input-string doesn't work</title>
      <link>http://pear.php.net/bugs/16688</link>
      <content:encoded><![CDATA[<pre>SOAP Bug
Reported by mauz
2009-10-09T15:53:43+00:00
PHP: 5.2.5 OS: Debian Package Version: 0.12.0

Description:
------------
For testing purposes I tried to send a 'raw' SOAP Request to the Server. 

This doesn't work because the second Parameter of the call function is being converted to an array in function _generate (line 527 of Client.php).

When _options['input'] is not 'parse', then this conversion must be reversed in function makeEnvelope (line 910 of Base.php):

&lt; $smsg = $method;                     &lt;= wrong
&gt; $smsg = $method[0];                 &lt;= corrected


Test script:
---------------
$wsdl_uri = 'http://domain.de/operation?WSDL';
$client =&amp; new SOAP_Client($wsdl_uri, true);
$opts = array ('input' =&gt; 'raw', 'trace' =&gt; true);
$q = '';
$res = $client-&gt;call('getAdresse', $q, $opts, &quot;&quot;);
print_r($res);


Expected result:
----------------
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;SOAP-ENV:Envelope
 xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
 xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
 xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
 xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;
&lt;SOAP-ENV:Body&gt;&lt;ns1:getAdresseElement xmlns:ns1=&quot;http://domain.de/types/&quot;&gt;&lt;ns1:ID&gt;1199102&lt;/ns1:ID&gt;&lt;/ns1:getAdresseElement&gt;
&lt;/SOAP-ENV:Body&gt;
&lt;/SOAP-ENV:Envelope&gt;

Actual result:
--------------
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;SOAP-ENV:Envelope
 xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
 xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
 xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
 xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;
&lt;SOAP-ENV:Body&gt;Array
&lt;/SOAP-ENV:Body&gt;
&lt;/SOAP-ENV:Envelope&gt;</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Bug
Reported by mauz
2009-10-09T15:53:43+00:00
PHP: 5.2.5 OS: Debian Package Version: 0.12.0

Description:
------------
For testing purposes I tried to send a 'raw' SOAP Request to the Server. 

This doesn't work because the second Parameter of the call function is being converted to an array in function _generate (line 527 of Client.php).

When _options['input'] is not 'parse', then this conversion must be reversed in function makeEnvelope (line 910 of Base.php):

&lt; $smsg = $method;                     &lt;= wrong
&gt; $smsg = $method[0];                 &lt;= corrected


Test script:
---------------
$wsdl_uri = 'http://domain.de/operation?WSDL';
$client =&amp; new SOAP_Client($wsdl_uri, true);
$opts = array ('input' =&gt; 'raw', 'trace' =&gt; true);
$q = '';
$res = $client-&gt;call('getAdresse', $q, $opts, &quot;&quot;);
print_r($res);


Expected result:
----------------
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;SOAP-ENV:Envelope
 xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
 xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
 xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
 xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;
&lt;SOAP-ENV:Body&gt;&lt;ns1:getAdresseElement xmlns:ns1=&quot;http://domain.de/types/&quot;&gt;&lt;ns1:ID&gt;1199102&lt;/ns1:ID&gt;&lt;/ns1:getAdresseElement&gt;
&lt;/SOAP-ENV:Body&gt;
&lt;/SOAP-ENV:Envelope&gt;

Actual result:
--------------
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;SOAP-ENV:Envelope
 xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
 xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
 xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
 xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;
&lt;SOAP-ENV:Body&gt;Array
&lt;/SOAP-ENV:Body&gt;
&lt;/SOAP-ENV:Envelope&gt;</pre>]]></description>
      <dc:date>2009-10-09T15:53:43+00:00</dc:date>
      <dc:creator>Hartmut &amp;#x64;&amp;#111;&amp;#x74; Wilhelms &amp;#x61;&amp;#116; arcor &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>SOAP Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16645">
      <title>SOAP: Feature/Change Request 16645 [Verified] &quot;application/soap+xml&quot; Transport Media Type Support</title>
      <link>http://pear.php.net/bugs/16645</link>
      <content:encoded><![CDATA[<pre>SOAP Feature/Change Request
Reported by mauz
2009-09-25T16:57:11+00:00
PHP: 5.2.5 OS: Debian Package Version: 0.12.0

Description:
------------
The Oracle-Application-Server-10g/10.1.3.1.0 does not understand the &quot;Content-Type: text/xml ...&quot; and always throws an VersionMismatch Error.

This Error disappeared, when I set this to &quot;Content-Type: application/soap+xml ...&quot; as specified in Appendix A of the SOAP Version 1.2 Part 2 Specification.

I Propose a new Option for call with the Name 'media_type', which specifies the String after Content-Type and before charset within the HTTP Header.

This could be realized by the following lines of code within Transport/HTTP.php (about line 449):

if (isset($options['media_type'])) {
            $this-&gt;headers['Content-Type'] = $options['media_type'].&quot;; charset=$this-&gt;encoding&quot;;
        } else {
            $this-&gt;headers['Content-Type'] = &quot;text/xml; charset=$this-&gt;encoding&quot;;
        }


Test script:
---------------
$client =&amp; new SOAP_Client(&lt;url&gt;);

$opts = array (
        'trace'         =&gt; true,
        'media_type'    =&gt; 'application/soap+xml',
        .... );

$res = $client-&gt;call (&lt;method&gt;, &lt;values&gt;, $opts);


Expected result:
----------------
POST /path    HTTP/1.0
User-Agent: PEAR-SOAP 0.12.0-beta
Host: vsrv25.domain.de
Content-Type: application/soap+xml; charset=UTF-8
Content-Length: 372
SOAPAction: &quot;http://service.domain.de//method&quot;
Connection: close


Actual result:
--------------
POST /path HTTP/1.0
User-Agent: PEAR-SOAP 0.12.0-beta
Host: vsrv25.domain.de
Content-Type: text/xml; charset=UTF-8
Content-Length: 372
SOAPAction: &quot;http://service.domain.de//method&quot;
Connection: close</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Feature/Change Request
Reported by mauz
2009-09-25T16:57:11+00:00
PHP: 5.2.5 OS: Debian Package Version: 0.12.0

Description:
------------
The Oracle-Application-Server-10g/10.1.3.1.0 does not understand the &quot;Content-Type: text/xml ...&quot; and always throws an VersionMismatch Error.

This Error disappeared, when I set this to &quot;Content-Type: application/soap+xml ...&quot; as specified in Appendix A of the SOAP Version 1.2 Part 2 Specification.

I Propose a new Option for call with the Name 'media_type', which specifies the String after Content-Type and before charset within the HTTP Header.

This could be realized by the following lines of code within Transport/HTTP.php (about line 449):

if (isset($options['media_type'])) {
            $this-&gt;headers['Content-Type'] = $options['media_type'].&quot;; charset=$this-&gt;encoding&quot;;
        } else {
            $this-&gt;headers['Content-Type'] = &quot;text/xml; charset=$this-&gt;encoding&quot;;
        }


Test script:
---------------
$client =&amp; new SOAP_Client(&lt;url&gt;);

$opts = array (
        'trace'         =&gt; true,
        'media_type'    =&gt; 'application/soap+xml',
        .... );

$res = $client-&gt;call (&lt;method&gt;, &lt;values&gt;, $opts);


Expected result:
----------------
POST /path    HTTP/1.0
User-Agent: PEAR-SOAP 0.12.0-beta
Host: vsrv25.domain.de
Content-Type: application/soap+xml; charset=UTF-8
Content-Length: 372
SOAPAction: &quot;http://service.domain.de//method&quot;
Connection: close


Actual result:
--------------
POST /path HTTP/1.0
User-Agent: PEAR-SOAP 0.12.0-beta
Host: vsrv25.domain.de
Content-Type: text/xml; charset=UTF-8
Content-Length: 372
SOAPAction: &quot;http://service.domain.de//method&quot;
Connection: close</pre>]]></description>
      <dc:date>2009-10-05T12:34:38+00:00</dc:date>
      <dc:creator>Hartmut &amp;#x64;&amp;#111;&amp;#x74; Wilhelms &amp;#x61;&amp;#116; arcor &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>SOAP Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14920">
      <title>SOAP: Feature/Change Request 14920 [Open] Cannot read attributes</title>
      <link>http://pear.php.net/bugs/14920</link>
      <content:encoded><![CDATA[<pre>SOAP Feature/Change Request
Reported by dfowler81
2008-10-29T15:51:19+00:00
PHP: 5.2.0 OS: Linux Package Version: 0.12.0

Description:
------------
I have created a SOAP client that connects to a web service using WSDL.  Most of the requests and responses are using simple element tags.  Since the package places responses in an associative array, this is fine.  However, there are several requests that have attributes.  I was able to accomplish this using SOAP_Value(), but the problem is that the response also has attributes.  After reading as much documentation as I could find, I can not find a way to read these attributes.</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Feature/Change Request
Reported by dfowler81
2008-10-29T15:51:19+00:00
PHP: 5.2.0 OS: Linux Package Version: 0.12.0

Description:
------------
I have created a SOAP client that connects to a web service using WSDL.  Most of the requests and responses are using simple element tags.  Since the package places responses in an associative array, this is fine.  However, there are several requests that have attributes.  I was able to accomplish this using SOAP_Value(), but the problem is that the response also has attributes.  After reading as much documentation as I could find, I can not find a way to read these attributes.</pre>]]></description>
      <dc:date>2008-10-29T15:51:19+00:00</dc:date>
      <dc:creator>ralze34 &amp;#x61;&amp;#116; yahoo &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>SOAP Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14854">
      <title>SOAP: Bug 14854 [Open] multipart/related responses no longer handled correctly</title>
      <link>http://pear.php.net/bugs/14854</link>
      <content:encoded><![CDATA[<pre>SOAP Bug
Reported by rbro
2008-10-23T09:04:46+00:00
PHP: 5.2.6 OS: Linux Package Version: 0.12.0

Description:
------------
In revision 1.60 of SOAP/Transport/HTTP.php, the following logic was added for HTTP 200 and 202 response codes in the method _parseResponse():

$this-&gt;incoming_payload = trim($match[2]);
if (!strlen($this-&gt;incoming_payload)) {
	/* Valid one-way message response. */
	return true;
}

This code resets $this-&gt;incoming_payload to the body of the HTTP response, removing the HTTP headers.  The issue I'm running into is if the HTTP response has a content-type of multipart/related, when _decodeMimeMessage() is called a little farther down, $this-&gt;incoming_payload no longer has the HTTP headers, including the boundary string which is needed to correctly parse the incoming message and separate it into its individual parts.</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Bug
Reported by rbro
2008-10-23T09:04:46+00:00
PHP: 5.2.6 OS: Linux Package Version: 0.12.0

Description:
------------
In revision 1.60 of SOAP/Transport/HTTP.php, the following logic was added for HTTP 200 and 202 response codes in the method _parseResponse():

$this-&gt;incoming_payload = trim($match[2]);
if (!strlen($this-&gt;incoming_payload)) {
	/* Valid one-way message response. */
	return true;
}

This code resets $this-&gt;incoming_payload to the body of the HTTP response, removing the HTTP headers.  The issue I'm running into is if the HTTP response has a content-type of multipart/related, when _decodeMimeMessage() is called a little farther down, $this-&gt;incoming_payload no longer has the HTTP headers, including the boundary string which is needed to correctly parse the incoming message and separate it into its individual parts.</pre>]]></description>
      <dc:date>2008-12-27T20:18:17+00:00</dc:date>
      <dc:creator>rbro &amp;#x61;&amp;#116; hotmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>SOAP Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14806">
      <title>SOAP: Bug 14806 [Open] Wrong value for xsd:unsignedLong's greater than PHP_INT_MAX</title>
      <link>http://pear.php.net/bugs/14806</link>
      <content:encoded><![CDATA[<pre>SOAP Bug
Reported by pet
2008-10-16T07:34:35+00:00
PHP: 5.1.2 OS:  Package Version: CVS

Description:
------------
I have a SOAPfunction that returns xsd:unsignedLong's. The PEAR::SOAP client returns a value 2147483647 (in my case equal to PHP_INT_MAX) when the value is larger than 2147483647.

An ugly workaroung would be something like this:

$client-&gt;{'_typemap'}['http://www.w3.org/2001/XMLSchema']['unsignedLong'] = 'string';

Test script:
---------------
require_once 'SOAP/Client.php';

$string = &lt;&lt;&lt;EOS
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;SOAP-ENV:Envelope  xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; xmlns:ns4=&quot;http://soapinterop.org/&quot; SOAP-ENV:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;&lt;SOAP-ENV:Body&gt; &lt;ns4:phpIntMaxResponse&gt;&lt;total xsi:type=&quot;xsd:unsignedLong&quot;&gt;2853166989&lt;/total&gt;&lt;/ns4:phpIntMaxResponse&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;
EOS;

$client = new SOAP_Client();
# Ugly workaround:
#  $client-&gt;{'_typemap'}['http://www.w3.org/2001/XMLSchema']['unsignedLong'] = 'string';
print($client-&gt;parseResponse($string)).&quot;\n&quot;;


Expected result:
----------------
2853166989

Actual result:
--------------
2147483647</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Bug
Reported by pet
2008-10-16T07:34:35+00:00
PHP: 5.1.2 OS:  Package Version: CVS

Description:
------------
I have a SOAPfunction that returns xsd:unsignedLong's. The PEAR::SOAP client returns a value 2147483647 (in my case equal to PHP_INT_MAX) when the value is larger than 2147483647.

An ugly workaroung would be something like this:

$client-&gt;{'_typemap'}['http://www.w3.org/2001/XMLSchema']['unsignedLong'] = 'string';

Test script:
---------------
require_once 'SOAP/Client.php';

$string = &lt;&lt;&lt;EOS
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;SOAP-ENV:Envelope  xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; xmlns:ns4=&quot;http://soapinterop.org/&quot; SOAP-ENV:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;&lt;SOAP-ENV:Body&gt; &lt;ns4:phpIntMaxResponse&gt;&lt;total xsi:type=&quot;xsd:unsignedLong&quot;&gt;2853166989&lt;/total&gt;&lt;/ns4:phpIntMaxResponse&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;
EOS;

$client = new SOAP_Client();
# Ugly workaround:
#  $client-&gt;{'_typemap'}['http://www.w3.org/2001/XMLSchema']['unsignedLong'] = 'string';
print($client-&gt;parseResponse($string)).&quot;\n&quot;;


Expected result:
----------------
2853166989

Actual result:
--------------
2147483647</pre>]]></description>
      <dc:date>2008-12-27T20:17:02+00:00</dc:date>
      <dc:creator>pear &amp;#x61;&amp;#116; painfullscratch &amp;#x64;&amp;#111;&amp;#x74; nl</dc:creator>
      <dc:subject>SOAP Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14782">
      <title>SOAP: Bug 14782 [Assigned] logic problem in SOAP_Base bulids multidimensional arrays instead of flat</title>
      <link>http://pear.php.net/bugs/14782</link>
      <content:encoded><![CDATA[<pre>SOAP Bug
Reported by gram
2008-10-12T22:10:18+00:00
PHP: 5.2.3 OS: Ububntu 7.10 Package Version: 0.12.0

Description:
------------
This is the only SOAP client I have tested that produced this problem.  All others produced flat arrays for this circumstance.

I have several 'Item' tags coming back sequentially in my xml as value to 'Item' Container tag.

In Base.php line 826 object SOAP_Base method _decode():
$return-&gt;{$item-&gt;name} = array($return-&gt;{$item-&gt;name}, $d);

If $return-&gt;{$item-&gt;name} is already an array, this will end up building a multidimensional array because this line builds a new array using the existing value (which could be an array) and the newly decoded object.  Result == array(array($obj, $obj),$obj).  

This problem compounds as items are added to this array building progressively deeper arrays.

I am using this class to process requests from Amazon Associates Services which will always try to return ten 'Items' as a the value to a single tags value.  I end up with an array that has ten elements in it, the first is ten levels deep, the second 9 levels deep etc...

I replaced line 826 with:

                            if(is_array($return-&gt;{$item-&gt;name})){
                            $return-&gt;{$item-&gt;name} = array_merge($return-&gt;{$item-&gt;name},array($d));
                            } else {
                            $return-&gt;{$item-&gt;name} = array($return-&gt;{$item-&gt;name}, $d);
                            }

This completely solved the problem, and I have seen no adverse effects in any other areas of the code.

I do not use the same coding standards that Pear uses, so not attaching a patch.  Also not filling in the remainder of this form as the problem is self evident.  Just wanted to pass it on.

Thanks for the great work folks!

Gram</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Bug
Reported by gram
2008-10-12T22:10:18+00:00
PHP: 5.2.3 OS: Ububntu 7.10 Package Version: 0.12.0

Description:
------------
This is the only SOAP client I have tested that produced this problem.  All others produced flat arrays for this circumstance.

I have several 'Item' tags coming back sequentially in my xml as value to 'Item' Container tag.

In Base.php line 826 object SOAP_Base method _decode():
$return-&gt;{$item-&gt;name} = array($return-&gt;{$item-&gt;name}, $d);

If $return-&gt;{$item-&gt;name} is already an array, this will end up building a multidimensional array because this line builds a new array using the existing value (which could be an array) and the newly decoded object.  Result == array(array($obj, $obj),$obj).  

This problem compounds as items are added to this array building progressively deeper arrays.

I am using this class to process requests from Amazon Associates Services which will always try to return ten 'Items' as a the value to a single tags value.  I end up with an array that has ten elements in it, the first is ten levels deep, the second 9 levels deep etc...

I replaced line 826 with:

                            if(is_array($return-&gt;{$item-&gt;name})){
                            $return-&gt;{$item-&gt;name} = array_merge($return-&gt;{$item-&gt;name},array($d));
                            } else {
                            $return-&gt;{$item-&gt;name} = array($return-&gt;{$item-&gt;name}, $d);
                            }

This completely solved the problem, and I have seen no adverse effects in any other areas of the code.

I do not use the same coding standards that Pear uses, so not attaching a patch.  Also not filling in the remainder of this form as the problem is self evident.  Just wanted to pass it on.

Thanks for the great work folks!

Gram</pre>]]></description>
      <dc:date>2008-10-25T01:44:37+00:00</dc:date>
      <dc:creator>gram &amp;#x61;&amp;#116; roadstarclinic &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>SOAP Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14756">
      <title>SOAP: Bug 14756 [Open] multipart/related response is not parsed</title>
      <link>http://pear.php.net/bugs/14756</link>
      <content:encoded><![CDATA[<pre>SOAP Bug
Reported by maya
2008-10-07T21:12:38+00:00
PHP: 4.3.9 OS: Linux Package Version: 0.12.0

Description:
------------
I'm accessing to Amazon seller API with SOAP.

When I called &quot;getDocument&quot; soap method, following error is occuerd:
&quot;XML error on line 2 col 0 byte 525 junk after document element&quot;


I checked Transport/HTTP.php.
It calls _decodeMimeMessage with only a body of the resoponse of SOAP. I think _decodeMimeMessage requires &quot;boundary&quot; for parse as multipart.



Amazon SOAP server returns a response like this:
Content-Type: multipart/related; boundary=&quot;xxx-WASP-CPP-MIME-Boundary-xxx-yyyyyyyyy-zzzzzzzz-xxx-END-xxx&quot;; type=&quot;text/xml&quot;

--xxx-WASP-CPP-MIME-Boundary-xxx-yyyyyyyyy-zzzzzzzz-xxx-END-xxx
Content-Type: text/xml; charset=&quot;UTF-8&quot;

&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:SE=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;&lt;SOAP-ENV:Body&gt;&lt;ns0:string_Response xsi:type=&quot;xsd:string&quot; xmlns:ns0=&quot;http://systinet.com/xsd/SchemaTypes/&quot;&gt;&lt;snip&gt;&lt;/snip&gt;&lt;/ns0:string_Response&gt;&lt;ns1:doc href=&quot;cid:0xad86d30-0xae618b8-0xae037c0-0xaffa268-0xae62400&quot; xmlns:ns1=&quot;http://systinet.com/xsd/SchemaTypes/&quot;/&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;
--xxx-WASP-CPP-MIME-Boundary-xxx-yyyyyyyyy-zzzzzzzz-xxx-END-xxx
Content-ID: &lt;0xad86d30-0xae618b8-0xae037c0-0xaffa268-0xae62400&gt;
Content-Type: application/binary

&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;AmazonEnvelope xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;amzn-envelope.xsd&quot;&gt;
&lt;snip&gt;&lt;/snip&gt;
&lt;/AmazonEnvelope&gt;

--xxx-WASP-CPP-MIME-Boundary-xxx-yyyyyyyyy-zzzzzzzz-xxx-END-xxx--


But Transport/HTTP.php put only this to _decodeMimeMessage.
--xxx-WASP-CPP-MIME-Boundary-xxx-yyyyyyyyy-zzzzzzzz-xxx-END-xxx
Content-Type: text/xml; charset=&quot;UTF-8&quot;

&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:SE=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;&lt;SOAP-ENV:Body&gt;&lt;ns0:string_Response xsi:type=&quot;xsd:string&quot; xmlns:ns0=&quot;http://systinet.com/xsd/SchemaTypes/&quot;&gt;&lt;snip&gt;&lt;/snip&gt;&lt;/ns0:string_Response&gt;&lt;ns1:doc href=&quot;cid:0xad86d30-0xae618b8-0xae037c0-0xaffa268-0xae62400&quot; xmlns:ns1=&quot;http://systinet.com/xsd/SchemaTypes/&quot;/&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;
--xxx-WASP-CPP-MIME-Boundary-xxx-yyyyyyyyy-zzzzzzzz-xxx-END-xxx
Content-ID: &lt;0xad86d30-0xae618b8-0xae037c0-0xaffa268-0xae62400&gt;
Content-Type: application/binary

&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;AmazonEnvelope xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;amzn-envelope.xsd&quot;&gt;
&lt;snip&gt;&lt;/snip&gt;
&lt;/AmazonEnvelope&gt;

--xxx-WASP-CPP-MIME-Boundary-xxx-yyyyyyyyy-zzzzzzzz-xxx-END-xxx--

Test script:
---------------
--- HTTP.php.orig       2008-10-08 11:02:16.000000000 +0900
+++ HTTP.php    2008-10-08 10:53:08.000000000 +0900
@@ -393,7 +393,8 @@
             $this-&gt;result_content_type = $this-&gt;headers['content-type'];
         } elseif (stristr($this-&gt;result_content_type, 'multipart/related')) {
             $this-&gt;response = $this-&gt;incoming_payload;
-            if (PEAR::isError($this-&gt;_decodeMimeMessage($this-&gt;response, $this-&gt;headers, $this-&gt;attachments))) {
+            $res_data = &quot;Content-Type: &quot;.$this-&gt;result_content_type.&quot;\n\n&quot;.$this-&gt;response;
+            if (PEAR::isError($this-&gt;_decodeMimeMessage($res_data, $this-&gt;headers, $this-&gt;attachments))) {
                 // _decodeMimeMessage already raised $this-&gt;fault
                 return false;
             }</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Bug
Reported by maya
2008-10-07T21:12:38+00:00
PHP: 4.3.9 OS: Linux Package Version: 0.12.0

Description:
------------
I'm accessing to Amazon seller API with SOAP.

When I called &quot;getDocument&quot; soap method, following error is occuerd:
&quot;XML error on line 2 col 0 byte 525 junk after document element&quot;


I checked Transport/HTTP.php.
It calls _decodeMimeMessage with only a body of the resoponse of SOAP. I think _decodeMimeMessage requires &quot;boundary&quot; for parse as multipart.



Amazon SOAP server returns a response like this:
Content-Type: multipart/related; boundary=&quot;xxx-WASP-CPP-MIME-Boundary-xxx-yyyyyyyyy-zzzzzzzz-xxx-END-xxx&quot;; type=&quot;text/xml&quot;

--xxx-WASP-CPP-MIME-Boundary-xxx-yyyyyyyyy-zzzzzzzz-xxx-END-xxx
Content-Type: text/xml; charset=&quot;UTF-8&quot;

&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:SE=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;&lt;SOAP-ENV:Body&gt;&lt;ns0:string_Response xsi:type=&quot;xsd:string&quot; xmlns:ns0=&quot;http://systinet.com/xsd/SchemaTypes/&quot;&gt;&lt;snip&gt;&lt;/snip&gt;&lt;/ns0:string_Response&gt;&lt;ns1:doc href=&quot;cid:0xad86d30-0xae618b8-0xae037c0-0xaffa268-0xae62400&quot; xmlns:ns1=&quot;http://systinet.com/xsd/SchemaTypes/&quot;/&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;
--xxx-WASP-CPP-MIME-Boundary-xxx-yyyyyyyyy-zzzzzzzz-xxx-END-xxx
Content-ID: &lt;0xad86d30-0xae618b8-0xae037c0-0xaffa268-0xae62400&gt;
Content-Type: application/binary

&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;AmazonEnvelope xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;amzn-envelope.xsd&quot;&gt;
&lt;snip&gt;&lt;/snip&gt;
&lt;/AmazonEnvelope&gt;

--xxx-WASP-CPP-MIME-Boundary-xxx-yyyyyyyyy-zzzzzzzz-xxx-END-xxx--


But Transport/HTTP.php put only this to _decodeMimeMessage.
--xxx-WASP-CPP-MIME-Boundary-xxx-yyyyyyyyy-zzzzzzzz-xxx-END-xxx
Content-Type: text/xml; charset=&quot;UTF-8&quot;

&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:SE=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;&lt;SOAP-ENV:Body&gt;&lt;ns0:string_Response xsi:type=&quot;xsd:string&quot; xmlns:ns0=&quot;http://systinet.com/xsd/SchemaTypes/&quot;&gt;&lt;snip&gt;&lt;/snip&gt;&lt;/ns0:string_Response&gt;&lt;ns1:doc href=&quot;cid:0xad86d30-0xae618b8-0xae037c0-0xaffa268-0xae62400&quot; xmlns:ns1=&quot;http://systinet.com/xsd/SchemaTypes/&quot;/&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;
--xxx-WASP-CPP-MIME-Boundary-xxx-yyyyyyyyy-zzzzzzzz-xxx-END-xxx
Content-ID: &lt;0xad86d30-0xae618b8-0xae037c0-0xaffa268-0xae62400&gt;
Content-Type: application/binary

&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;AmazonEnvelope xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;amzn-envelope.xsd&quot;&gt;
&lt;snip&gt;&lt;/snip&gt;
&lt;/AmazonEnvelope&gt;

--xxx-WASP-CPP-MIME-Boundary-xxx-yyyyyyyyy-zzzzzzzz-xxx-END-xxx--

Test script:
---------------
--- HTTP.php.orig       2008-10-08 11:02:16.000000000 +0900
+++ HTTP.php    2008-10-08 10:53:08.000000000 +0900
@@ -393,7 +393,8 @@
             $this-&gt;result_content_type = $this-&gt;headers['content-type'];
         } elseif (stristr($this-&gt;result_content_type, 'multipart/related')) {
             $this-&gt;response = $this-&gt;incoming_payload;
-            if (PEAR::isError($this-&gt;_decodeMimeMessage($this-&gt;response, $this-&gt;headers, $this-&gt;attachments))) {
+            $res_data = &quot;Content-Type: &quot;.$this-&gt;result_content_type.&quot;\n\n&quot;.$this-&gt;response;
+            if (PEAR::isError($this-&gt;_decodeMimeMessage($res_data, $this-&gt;headers, $this-&gt;attachments))) {
                 // _decodeMimeMessage already raised $this-&gt;fault
                 return false;
             }</pre>]]></description>
      <dc:date>2008-12-27T20:18:38+00:00</dc:date>
      <dc:creator>libpq &amp;#x61;&amp;#116; yahoo &amp;#x64;&amp;#111;&amp;#x74; co &amp;#x64;&amp;#111;&amp;#x74; jp</dc:creator>
      <dc:subject>SOAP Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14344">
      <title>SOAP: Feature/Change Request 14344 [Open] Use Net_Server in SOAP_Server_TCP</title>
      <link>http://pear.php.net/bugs/14344</link>
      <content:encoded><![CDATA[<pre>SOAP Feature/Change Request
Reported by tomaszrup
2008-07-14T03:45:05+00:00
PHP: 5.2.6 OS: Mandriva Linux Package Version: 0.11.0

Description:
------------
Net_Server is a better solution from the loop while(true){}</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Feature/Change Request
Reported by tomaszrup
2008-07-14T03:45:05+00:00
PHP: 5.2.6 OS: Mandriva Linux Package Version: 0.11.0

Description:
------------
Net_Server is a better solution from the loop while(true){}</pre>]]></description>
      <dc:date>2008-07-30T09:30:13+00:00</dc:date>
      <dc:creator>tomasz &amp;#x64;&amp;#111;&amp;#x74; rup &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>SOAP Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14306">
      <title>SOAP: Bug 14306 [Verified] SOAP_Server_TCP not generate response for SOAP_Fault</title>
      <link>http://pear.php.net/bugs/14306</link>
      <content:encoded><![CDATA[<pre>SOAP Bug
Reported by tomaszrup
2008-07-07T18:11:32+00:00
PHP: 5.2.6 OS: Mandriva Linux Package Version: 0.11.0

Description:
------------
TCP SOAP server crash when soap method return  SOAP_Fault object.

Test script:
---------------
server:
&lt;?php
require_once 'SOAP/Server/TCP.php';
$skiptrace =&amp; PEAR::getStaticProperty('PEAR_Error', 'skiptrace');
$skiptrace = true;

class SOAP_Example_Server {
        public $__dispatch_map = array();

        public function __construct() {
                $this-&gt;__dispatch_map['test'] = array(
                        'in' =&gt; array('inputString' =&gt; 'string'),
                        'out' =&gt; array('outputString' =&gt; 'string'),
                );
        }


        public function __dispatch($methodname) {
                if (isset($this-&gt;__dispatch_map[$methodname]))
                        return $this-&gt;__dispatch_map[$methodname];
                return NULL;
        }

        public function test($inputString) {
                return new SOAP_Fault('Fault!', 'Server');
        }
}

$server = new SOAP_Server_TCP('127.0.0.1', 10102);
$server-&gt;_auto_translation = true;

$soapclass = new SOAP_Example_Server;
$server-&gt;addObjectMap($soapclass,'urn:SOAP_Example_Server');
$server-&gt;run();
?&gt;

client:
&lt;?php
require_once('SOAP/Client.php');
$soapclient = new SOAP_Client(&quot;tcp://127.0.0.1:10102&quot;);
$options = array('namespace' =&gt; 'urn:SOAP_Example_Server', 'trace' =&gt; true);

$params = array(&quot;inputString&quot; =&gt; &quot;this is string 1&quot;);
$ret = $soapclient-&gt;call(&quot;test&quot;, $params, $options);

echo PEAR::isError($ret) ? $ret-&gt;getMessage() : $ret;
?&gt;

Expected result:
----------------
Fault!

Actual result:
--------------
Error reveiving data from tcp://127.0.0.1:10102</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Bug
Reported by tomaszrup
2008-07-07T18:11:32+00:00
PHP: 5.2.6 OS: Mandriva Linux Package Version: 0.11.0

Description:
------------
TCP SOAP server crash when soap method return  SOAP_Fault object.

Test script:
---------------
server:
&lt;?php
require_once 'SOAP/Server/TCP.php';
$skiptrace =&amp; PEAR::getStaticProperty('PEAR_Error', 'skiptrace');
$skiptrace = true;

class SOAP_Example_Server {
        public $__dispatch_map = array();

        public function __construct() {
                $this-&gt;__dispatch_map['test'] = array(
                        'in' =&gt; array('inputString' =&gt; 'string'),
                        'out' =&gt; array('outputString' =&gt; 'string'),
                );
        }


        public function __dispatch($methodname) {
                if (isset($this-&gt;__dispatch_map[$methodname]))
                        return $this-&gt;__dispatch_map[$methodname];
                return NULL;
        }

        public function test($inputString) {
                return new SOAP_Fault('Fault!', 'Server');
        }
}

$server = new SOAP_Server_TCP('127.0.0.1', 10102);
$server-&gt;_auto_translation = true;

$soapclass = new SOAP_Example_Server;
$server-&gt;addObjectMap($soapclass,'urn:SOAP_Example_Server');
$server-&gt;run();
?&gt;

client:
&lt;?php
require_once('SOAP/Client.php');
$soapclient = new SOAP_Client(&quot;tcp://127.0.0.1:10102&quot;);
$options = array('namespace' =&gt; 'urn:SOAP_Example_Server', 'trace' =&gt; true);

$params = array(&quot;inputString&quot; =&gt; &quot;this is string 1&quot;);
$ret = $soapclient-&gt;call(&quot;test&quot;, $params, $options);

echo PEAR::isError($ret) ? $ret-&gt;getMessage() : $ret;
?&gt;

Expected result:
----------------
Fault!

Actual result:
--------------
Error reveiving data from tcp://127.0.0.1:10102</pre>]]></description>
      <dc:date>2008-07-19T02:45:02+00:00</dc:date>
      <dc:creator>tomasz &amp;#x64;&amp;#111;&amp;#x74; rup &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>SOAP Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14065">
      <title>SOAP: Bug 14065 [Open] Array Wrapped w/ Extra Tag</title>
      <link>http://pear.php.net/bugs/14065</link>
      <content:encoded><![CDATA[<pre>SOAP Bug
Reported by rossking
2008-06-03T23:16:34+00:00
PHP: 5.2.1 OS: Linux lamp 2.6.20-16 Package Version: 0.11.0

Description:
------------
When I pass an Array to the SOAP WSDL Interface it takes each array item and wraps with the tag &lt;item&gt; and then it also wrap's with the array name and values as it should.

how do I stop the &lt;item&gt; tags, These are causing my script to fail.

Expected result:
----------------
&lt;ns4:PublicationIDs&gt;

&lt;ns4:int&gt;2&lt;/ns4:int&gt;
&lt;ns4:int&gt;3&lt;/ns4:int&gt;

&lt;/ns4:PublicationIDs&gt;


Actual result:
--------------
&lt;ns4:PublicationIDs&gt;
&lt;ns4:item&gt;
&lt;ns4:int&gt;2&lt;/ns4:int&gt;&lt;/ns4:item&gt;
&lt;ns4:item&gt;
&lt;ns4:int&gt;3&lt;/ns4:int&gt;&lt;/ns4:item&gt;&lt;/ns4:PublicationIDs&gt;</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Bug
Reported by rossking
2008-06-03T23:16:34+00:00
PHP: 5.2.1 OS: Linux lamp 2.6.20-16 Package Version: 0.11.0

Description:
------------
When I pass an Array to the SOAP WSDL Interface it takes each array item and wraps with the tag &lt;item&gt; and then it also wrap's with the array name and values as it should.

how do I stop the &lt;item&gt; tags, These are causing my script to fail.

Expected result:
----------------
&lt;ns4:PublicationIDs&gt;

&lt;ns4:int&gt;2&lt;/ns4:int&gt;
&lt;ns4:int&gt;3&lt;/ns4:int&gt;

&lt;/ns4:PublicationIDs&gt;


Actual result:
--------------
&lt;ns4:PublicationIDs&gt;
&lt;ns4:item&gt;
&lt;ns4:int&gt;2&lt;/ns4:int&gt;&lt;/ns4:item&gt;
&lt;ns4:item&gt;
&lt;ns4:int&gt;3&lt;/ns4:int&gt;&lt;/ns4:item&gt;&lt;/ns4:PublicationIDs&gt;</pre>]]></description>
      <dc:date>2009-01-01T09:30:20+00:00</dc:date>
      <dc:creator>ross &amp;#x64;&amp;#111;&amp;#x74; king &amp;#x61;&amp;#116; onebx &amp;#x64;&amp;#111;&amp;#x74; us</dc:creator>
      <dc:subject>SOAP Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/13552">
      <title>SOAP: Feature/Change Request 13552 [Open] Improve memory usage when serializing arrays</title>
      <link>http://pear.php.net/bugs/13552</link>
      <content:encoded><![CDATA[<pre>SOAP Feature/Change Request
Reported by jasony
2008-04-01T02:33:22+00:00
PHP: 5.2.3 OS: Ubuntu Linux Package Version: 0.11.0

Description:
------------
When trying to create an array of integers on a Soap server, it bombs out if the array is over 12 elements. The error message is: Allowed memory size of 134217728 bytes exhausted (tried to allocate 44 bytes) in /usr/share/php/PEAR.php on line 868

Test script:
---------------
soap_server_crash_test.php:
&lt;?php
	require_once('SOAP/Server.php');
	require_once('SOAP/Disco.php');
	
	class CrashTest {
		public $__dispatch_map = array(); 
		public $__typedef=array();
		
		public function __construct() {
			$this-&gt;__typedef['ArrayOfIntegers'] = array(array('item'=&gt;'integer'));
			
			$this-&gt;__dispatch_map[&quot;crashMe&quot;]=array(&quot;in&quot;=&gt;array(&quot;arraysize&quot;=&gt;&quot;integer&quot;),&quot;out&quot;=&gt;array(&quot;artworks&quot;=&gt;&quot;{urn:CrashTest}ArrayOfIntegers&quot;));
		}
		
		public function crashMe($arraysize) {
			if ((empty($arraysize)) || (!is_numeric($arraysize))) {
				$fault=new SOAP_Fault(&quot;Invalid array size!&quot;);
				return $fault;
			}
			$result=array();
			for($x=0;$x&lt;$arraysize;$x++) {
				$result[]=$x;
			}
			return $result;
		}
	}
	
	
	
	$server = new SOAP_Server();
	$webservice=new CrashTest();
	$server-&gt;addObjectMap($webservice,'http://schemas.xmlsoap.org/soap/envelope/');
	if (isset($_SERVER['REQUEST_METHOD']) &amp;&amp; $_SERVER['REQUEST_METHOD']=='POST') {
		$server-&gt;service($HTTP_RAW_POST_DATA);
	} else {
		$disco = new SOAP_DISCO_Server($server,'CrashTest');
		header(&quot;Content-type: text/xml&quot;);
		if (isset($_SERVER['QUERY_STRING']) &amp;&amp; strcasecmp($_SERVER['QUERY_STRING'],'wsdl') == 0) {
			// show only the WSDL/XML output if ?wsdl is set in the address bar
			echo $disco-&gt;getWSDL();
		} else {
			echo $disco-&gt;getDISCO();
		}
	}
?&gt;

Test client:
&lt;?php
	include_once(&quot;objects/soap.inc&quot;);
	ini_set('soap.wsdl_cache_enabled', 0);
	$client=new SoapClient(&quot;http://localhost/dev/artvault_manager/soap_server_crash_test.php?wsdl&quot;,array('trace'=&gt;1));
	try {
		$result=$client-&gt;crashMe(12);
	} catch(SoapFault $exception) {
		$request_xml = $client-&gt;__getLastRequestHeaders() . $client-&gt;__getLastRequest();
		$response_xml = $client-&gt;__getLastResponseHeaders() . $client-&gt;__getLastResponse();
		echo $exception;
		print &quot;Request:&quot;.$request_xml;
		print &quot;Response:&quot;.$response_xml;
	}
	print_r($result);
?&gt;

Expected result:
----------------
Array
(
    [0] =&gt; 0
    [1] =&gt; 1
    [2] =&gt; 2
    [3] =&gt; 3
    [4] =&gt; 4
    [5] =&gt; 5
    [6] =&gt; 6
    [7] =&gt; 7
    [8] =&gt; 8
    [9] =&gt; 9
    [10] =&gt; 10
)

Actual result:
--------------
SoapFault exception: [Client] looks like we got no XML document in /home/jason/Development/artvault_manager/soap_crash_test.php:6
Stack trace:
#0 [internal function]: SoapClient-&gt;__call('crashMe', Array)
#1 /home/jason/Development/artvault_manager/soap_crash_test.php(6): SoapClient-&gt;crashMe(12)
#2 {main}Request:POST /dev/artvault_manager/soap_server_crash_test.php HTTP/1.1
Host: localhost
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.3-1ubuntu6.3
Content-Type: text/xml; charset=utf-8
SOAPAction: &quot;http://schemas.xmlsoap.org/soap/envelope/#CrashTest#crashMe&quot;
Content-Length: 479

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; SOAP-ENV:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;&lt;SOAP-ENV:Body&gt;&lt;SOAP-ENV:crashMe&gt;&lt;arraysize xsi:type=&quot;xsd:integer&quot;&gt;12&lt;/arraysize&gt;&lt;/SOAP-ENV:crashMe&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;
Response:HTTP/1.1 200 OK
Date: Tue, 01 Apr 2008 08:30:05 GMT
Server: Apache/2.2.4 (Ubuntu) mod_python/3.3.1 Python/2.5.1 PHP/5.2.3-1ubuntu6.3
X-Powered-By: PHP/5.2.3-1ubuntu6.3
Content-Length: 165
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
&lt;br /&gt;
&lt;b&gt;Fatal error&lt;/b&gt;:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in &lt;b&gt;/usr/share/php/PEAR.php&lt;/b&gt; on line &lt;b&gt;868&lt;/b&gt;&lt;br /&gt;</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Feature/Change Request
Reported by jasony
2008-04-01T02:33:22+00:00
PHP: 5.2.3 OS: Ubuntu Linux Package Version: 0.11.0

Description:
------------
When trying to create an array of integers on a Soap server, it bombs out if the array is over 12 elements. The error message is: Allowed memory size of 134217728 bytes exhausted (tried to allocate 44 bytes) in /usr/share/php/PEAR.php on line 868

Test script:
---------------
soap_server_crash_test.php:
&lt;?php
	require_once('SOAP/Server.php');
	require_once('SOAP/Disco.php');
	
	class CrashTest {
		public $__dispatch_map = array(); 
		public $__typedef=array();
		
		public function __construct() {
			$this-&gt;__typedef['ArrayOfIntegers'] = array(array('item'=&gt;'integer'));
			
			$this-&gt;__dispatch_map[&quot;crashMe&quot;]=array(&quot;in&quot;=&gt;array(&quot;arraysize&quot;=&gt;&quot;integer&quot;),&quot;out&quot;=&gt;array(&quot;artworks&quot;=&gt;&quot;{urn:CrashTest}ArrayOfIntegers&quot;));
		}
		
		public function crashMe($arraysize) {
			if ((empty($arraysize)) || (!is_numeric($arraysize))) {
				$fault=new SOAP_Fault(&quot;Invalid array size!&quot;);
				return $fault;
			}
			$result=array();
			for($x=0;$x&lt;$arraysize;$x++) {
				$result[]=$x;
			}
			return $result;
		}
	}
	
	
	
	$server = new SOAP_Server();
	$webservice=new CrashTest();
	$server-&gt;addObjectMap($webservice,'http://schemas.xmlsoap.org/soap/envelope/');
	if (isset($_SERVER['REQUEST_METHOD']) &amp;&amp; $_SERVER['REQUEST_METHOD']=='POST') {
		$server-&gt;service($HTTP_RAW_POST_DATA);
	} else {
		$disco = new SOAP_DISCO_Server($server,'CrashTest');
		header(&quot;Content-type: text/xml&quot;);
		if (isset($_SERVER['QUERY_STRING']) &amp;&amp; strcasecmp($_SERVER['QUERY_STRING'],'wsdl') == 0) {
			// show only the WSDL/XML output if ?wsdl is set in the address bar
			echo $disco-&gt;getWSDL();
		} else {
			echo $disco-&gt;getDISCO();
		}
	}
?&gt;

Test client:
&lt;?php
	include_once(&quot;objects/soap.inc&quot;);
	ini_set('soap.wsdl_cache_enabled', 0);
	$client=new SoapClient(&quot;http://localhost/dev/artvault_manager/soap_server_crash_test.php?wsdl&quot;,array('trace'=&gt;1));
	try {
		$result=$client-&gt;crashMe(12);
	} catch(SoapFault $exception) {
		$request_xml = $client-&gt;__getLastRequestHeaders() . $client-&gt;__getLastRequest();
		$response_xml = $client-&gt;__getLastResponseHeaders() . $client-&gt;__getLastResponse();
		echo $exception;
		print &quot;Request:&quot;.$request_xml;
		print &quot;Response:&quot;.$response_xml;
	}
	print_r($result);
?&gt;

Expected result:
----------------
Array
(
    [0] =&gt; 0
    [1] =&gt; 1
    [2] =&gt; 2
    [3] =&gt; 3
    [4] =&gt; 4
    [5] =&gt; 5
    [6] =&gt; 6
    [7] =&gt; 7
    [8] =&gt; 8
    [9] =&gt; 9
    [10] =&gt; 10
)

Actual result:
--------------
SoapFault exception: [Client] looks like we got no XML document in /home/jason/Development/artvault_manager/soap_crash_test.php:6
Stack trace:
#0 [internal function]: SoapClient-&gt;__call('crashMe', Array)
#1 /home/jason/Development/artvault_manager/soap_crash_test.php(6): SoapClient-&gt;crashMe(12)
#2 {main}Request:POST /dev/artvault_manager/soap_server_crash_test.php HTTP/1.1
Host: localhost
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.3-1ubuntu6.3
Content-Type: text/xml; charset=utf-8
SOAPAction: &quot;http://schemas.xmlsoap.org/soap/envelope/#CrashTest#crashMe&quot;
Content-Length: 479

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; SOAP-ENV:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;&lt;SOAP-ENV:Body&gt;&lt;SOAP-ENV:crashMe&gt;&lt;arraysize xsi:type=&quot;xsd:integer&quot;&gt;12&lt;/arraysize&gt;&lt;/SOAP-ENV:crashMe&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;
Response:HTTP/1.1 200 OK
Date: Tue, 01 Apr 2008 08:30:05 GMT
Server: Apache/2.2.4 (Ubuntu) mod_python/3.3.1 Python/2.5.1 PHP/5.2.3-1ubuntu6.3
X-Powered-By: PHP/5.2.3-1ubuntu6.3
Content-Length: 165
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
&lt;br /&gt;
&lt;b&gt;Fatal error&lt;/b&gt;:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in &lt;b&gt;/usr/share/php/PEAR.php&lt;/b&gt; on line &lt;b&gt;868&lt;/b&gt;&lt;br /&gt;</pre>]]></description>
      <dc:date>2008-07-16T09:32:34+00:00</dc:date>
      <dc:creator>phppear &amp;#x61;&amp;#116; freespeechpub &amp;#x64;&amp;#111;&amp;#x74; co &amp;#x64;&amp;#111;&amp;#x74; za</dc:creator>
      <dc:subject>SOAP Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/12977">
      <title>SOAP: Bug 12977 [Open] HTTP Authentication by http://user:pass@ buggy!</title>
      <link>http://pear.php.net/bugs/12977</link>
      <content:encoded><![CDATA[<pre>SOAP Bug
Reported by chammers
2008-01-25T08:20:12+00:00
PHP: 5.2.5 OS: Linux Package Version: 0.11.0

Description:
------------
Hello

While migrating old scripts to a recent Linux host I discovered that the
old way of calling &quot;$client = new SOAP_Client('http://user:pass@...&quot;
does no longer work.

When calling $client-&gt;send() there is still an internal call to Transport/HTTP.php's function _validateURL which parses the URL and creates a $this-&gt;headers['Authorization'] but the SOAP_Client-&gt;call()  function does not honor this header() variable at all but only takes options from the passwd $options variable.

So the new way of calling is (as documented in Bug 11830) to pass &quot;user&quot; and &quot;pass&quot; as options to SOAP_Client-&gt;call().

Still I would assume that the old way was dropped by accident and should be reactivated (as it's a common to pass credentials inside the URL).

bye,

-christian-

Test script:
---------------
$this-&gt;soapclient = new SOAP_Client(&quot;http://webservice:topsecret@webmanager.company.de
&quot;);
$domainids = $this-&gt;soapclient-&gt;call('getDomainId', array(), '');


Expected result:
----------------
something from the remote server

Actual result:
--------------
HTTP Response 401 Authentication Failed (Code HTTP)</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Bug
Reported by chammers
2008-01-25T08:20:12+00:00
PHP: 5.2.5 OS: Linux Package Version: 0.11.0

Description:
------------
Hello

While migrating old scripts to a recent Linux host I discovered that the
old way of calling &quot;$client = new SOAP_Client('http://user:pass@...&quot;
does no longer work.

When calling $client-&gt;send() there is still an internal call to Transport/HTTP.php's function _validateURL which parses the URL and creates a $this-&gt;headers['Authorization'] but the SOAP_Client-&gt;call()  function does not honor this header() variable at all but only takes options from the passwd $options variable.

So the new way of calling is (as documented in Bug 11830) to pass &quot;user&quot; and &quot;pass&quot; as options to SOAP_Client-&gt;call().

Still I would assume that the old way was dropped by accident and should be reactivated (as it's a common to pass credentials inside the URL).

bye,

-christian-

Test script:
---------------
$this-&gt;soapclient = new SOAP_Client(&quot;http://webservice:topsecret@webmanager.company.de
&quot;);
$domainids = $this-&gt;soapclient-&gt;call('getDomainId', array(), '');


Expected result:
----------------
something from the remote server

Actual result:
--------------
HTTP Response 401 Authentication Failed (Code HTTP)</pre>]]></description>
      <dc:date>2008-07-14T09:00:48+00:00</dc:date>
      <dc:creator>chammers &amp;#x61;&amp;#116; netcologne &amp;#x64;&amp;#111;&amp;#x74; de</dc:creator>
      <dc:subject>SOAP Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/12349">
      <title>SOAP: Bug 12349 [Assigned] Endless recursion in SOAP Parser</title>
      <link>http://pear.php.net/bugs/12349</link>
      <content:encoded><![CDATA[<pre>SOAP Bug
Reported by erwinsnijders
2007-10-26T06:59:48+00:00
PHP: 5.2.1 OS: Windows Package Version: CVS

Description:
------------
In the class SOAP_Parser, the function _buildResponse is recursive.

If you're trying to parse a soap result with internal pointers (href=&quot;#id14&quot; in one element and id=&quot;id14&quot; in another element) and there is a loop in this pointers, the script crashes when all available memory is used.





Test script:
---------------
I came across this bug when I tried to parse a soap result with the children in a group with a pointer to their family with a pointer to all children in this family with a pointer to the child itself again (child A -&gt; family -&gt; children -&gt; child A, child B).

Expected result:
----------------
If the function _buildResponse($pos) is called recursively (with $child_pos as parameter) and it is going to process a position that it already processed before, a pointer to this previous result must be returned instead of generating the result at this position.</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Bug
Reported by erwinsnijders
2007-10-26T06:59:48+00:00
PHP: 5.2.1 OS: Windows Package Version: CVS

Description:
------------
In the class SOAP_Parser, the function _buildResponse is recursive.

If you're trying to parse a soap result with internal pointers (href=&quot;#id14&quot; in one element and id=&quot;id14&quot; in another element) and there is a loop in this pointers, the script crashes when all available memory is used.





Test script:
---------------
I came across this bug when I tried to parse a soap result with the children in a group with a pointer to their family with a pointer to all children in this family with a pointer to the child itself again (child A -&gt; family -&gt; children -&gt; child A, child B).

Expected result:
----------------
If the function _buildResponse($pos) is called recursively (with $child_pos as parameter) and it is going to process a position that it already processed before, a pointer to this previous result must be returned instead of generating the result at this position.</pre>]]></description>
      <dc:date>2008-08-04T04:18:49+00:00</dc:date>
      <dc:creator>E &amp;#x64;&amp;#111;&amp;#x74; Snijders &amp;#x61;&amp;#116; ROES &amp;#x64;&amp;#111;&amp;#x74; nl</dc:creator>
      <dc:subject>SOAP Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/11729">
      <title>SOAP: Bug 11729 [Assigned] WSDL Local File loading</title>
      <link>http://pear.php.net/bugs/11729</link>
      <content:encoded><![CDATA[<pre>SOAP Bug
Reported by tmpvar
2007-07-31T15:10:05+00:00
PHP: 5.2.2 OS: Windows XP Package Version: 0.11.0

Description:
------------
when attempting to load a local WSDL file from the PEAR::SOAP package, it returns an error.

Test script:
---------------
$wsdl_url = 'file://C:/FedEx/RateService_v1.wsdl';
$client = new SOAP_Client($wsdl_url,true);

Expected result:
----------------
no error

Actual result:
--------------
An error #WSDLCACHE occurred!
Error: Unable to retrieve WSDL file://C:/FedEx/RateService_v1.wsdl,</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Bug
Reported by tmpvar
2007-07-31T15:10:05+00:00
PHP: 5.2.2 OS: Windows XP Package Version: 0.11.0

Description:
------------
when attempting to load a local WSDL file from the PEAR::SOAP package, it returns an error.

Test script:
---------------
$wsdl_url = 'file://C:/FedEx/RateService_v1.wsdl';
$client = new SOAP_Client($wsdl_url,true);

Expected result:
----------------
no error

Actual result:
--------------
An error #WSDLCACHE occurred!
Error: Unable to retrieve WSDL file://C:/FedEx/RateService_v1.wsdl,</pre>]]></description>
      <dc:date>2008-03-22T10:19:10+00:00</dc:date>
      <dc:creator>tmpvar &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>SOAP Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/11508">
      <title>SOAP: Feature/Change Request 11508 [Open] Generate proxy code for complex types</title>
      <link>http://pear.php.net/bugs/11508</link>
      <content:encoded><![CDATA[<pre>SOAP Feature/Change Request
Reported by dmichonneau
2007-07-03T04:34:52+00:00
PHP: 5.2.3 OS: Windows Package Version: 0.11.0

Description:
------------
Currently the code generator for the proxy only generates a class with all methods for the SOAP calls. These methods typically take input parameters and return a variable. It would be very useful that the complex types used in those parameters and returned variables are also generated as classes. Similar proxy generation tools in Java or .NET can do this, but I didn't find any implementation in PHP that could generate the classes code for the complex types. It allows developers to immmediately know what to set in the request and how to read the response by looking at the generated classes.</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Feature/Change Request
Reported by dmichonneau
2007-07-03T04:34:52+00:00
PHP: 5.2.3 OS: Windows Package Version: 0.11.0

Description:
------------
Currently the code generator for the proxy only generates a class with all methods for the SOAP calls. These methods typically take input parameters and return a variable. It would be very useful that the complex types used in those parameters and returned variables are also generated as classes. Similar proxy generation tools in Java or .NET can do this, but I didn't find any implementation in PHP that could generate the classes code for the complex types. It allows developers to immmediately know what to set in the request and how to read the response by looking at the generated classes.</pre>]]></description>
      <dc:date>2007-07-03T04:34:52+00:00</dc:date>
      <dc:creator>dmichonneau &amp;#x61;&amp;#116; actuate &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>SOAP Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/8086">
      <title>SOAP: Bug 8086 [Open] Unable to correctly parse a WSDL</title>
      <link>http://pear.php.net/bugs/8086</link>
      <content:encoded><![CDATA[<pre>SOAP Bug
Reported by simone.m@...
2006-06-30T04:39:26+00:00
PHP: 4.4.1 OS: Linux Red Hat 9 Package Version: 0.9.4

Description:
------------
I'm trying to create a SOAP client from a WSDL created with Apache Axis version: 1.2.1. When I try to create an object directly from the proxy code, PEAR:SOAP returns me the following notice:

Notice: Undefined index: impl in /usr/local/php/lib/php/SOAP/WSDL.php on line 620

The the client doesn't work correctly, and I can't use the web service.

Test script:
---------------
require_once('SOAP/Client.php');
$client = new SOAP_WSDL('http://www.comune.modena.it/autenticationCig/wsdl/AutenticationCig.wsdl');

$proxy = $client-&gt;getProxy();

$params = array('ticketCig' =&gt; '123456');
$results = $proxy-&gt;getDatiUtenteCig($params);

Expected result:
----------------
The script above should create a working object based on the WSDL, but it doesn't work.

With Perl's SOAP::Lite it works correctly.

Actual result:
--------------
Notice: Undefined index: impl in /usr/local/php/lib/php/SOAP/WSDL.php on line 620</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Bug
Reported by simone.m@...
2006-06-30T04:39:26+00:00
PHP: 4.4.1 OS: Linux Red Hat 9 Package Version: 0.9.4

Description:
------------
I'm trying to create a SOAP client from a WSDL created with Apache Axis version: 1.2.1. When I try to create an object directly from the proxy code, PEAR:SOAP returns me the following notice:

Notice: Undefined index: impl in /usr/local/php/lib/php/SOAP/WSDL.php on line 620

The the client doesn't work correctly, and I can't use the web service.

Test script:
---------------
require_once('SOAP/Client.php');
$client = new SOAP_WSDL('http://www.comune.modena.it/autenticationCig/wsdl/AutenticationCig.wsdl');

$proxy = $client-&gt;getProxy();

$params = array('ticketCig' =&gt; '123456');
$results = $proxy-&gt;getDatiUtenteCig($params);

Expected result:
----------------
The script above should create a working object based on the WSDL, but it doesn't work.

With Perl's SOAP::Lite it works correctly.

Actual result:
--------------
Notice: Undefined index: impl in /usr/local/php/lib/php/SOAP/WSDL.php on line 620</pre>]]></description>
      <dc:date>2008-07-15T18:05:02+00:00</dc:date>
      <dc:creator>simone &amp;#x64;&amp;#111;&amp;#x74; m &amp;#x61;&amp;#116; lynx2000 &amp;#x64;&amp;#111;&amp;#x74; it</dc:creator>
      <dc:subject>SOAP Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/7634">
      <title>SOAP: Bug 7634 [Assigned] E_ERROR and E_WARNING inside SoapObject::$methodname</title>
      <link>http://pear.php.net/bugs/7634</link>
      <content:encoded><![CDATA[<pre>SOAP Bug
Reported by vitaly@...
2006-05-15T19:31:55+00:00
PHP: 4.4.2 OS: Linux Package Version: 0.9.4

Description:
------------
Hi everybody. 
I have a problem with error reporting inside an object which generate response for SOAP request. I mean object::method() which called from SOAP_Server::callMethod().
In my current configuration I have log_errors enabled in php.ini. So, all errors is (should be) logged. But any error which appear inside SOAP Object isn't logged by default.
Well. If I have E_WARNING than I can see error in SOAP Response, but if there is an E_ERROR, which can't be handled by SOAP_Server::_errorHandler(), that's real problem because I don't see it either in SOAP Response or log file (probably because of error muting @, I'm not sure). 
So, to solve this problem I've deleted @ before call to SOAP Object method, added ini_set('display_errors', false) to hide all errors and added writing to log file in SOAP_Server::_errorHandler() if option enabled in configuration.
Patch file solving this problem to expected result can be downloaded from http://vitaly.yakovenko.net/soap/SOAP_Server.patch . Put it in pear directory and `patch -p0 &lt; SOAP_Server.patch`. 
Hope this will help. 
Regards. Vitali.

Test script:
---------------
&lt;?php

// Uncomment line by line to see result
function HandleRequest()
{
    //include 'asdf.php'; // 1: should generate E_WARNING
    //require 'asdf.php'; // 2: should generate E_ERROR
    //parse error here    // 3: should generate E_PARSE
}
?&gt;

Expected result:
----------------
1: E_WARNING wrapped in SOAP Response and record in log file.
2: at least something saying that error happened
3: at leat something saying that error happened.

Actual result:
--------------
1: E_WARNING wrapped in SOAP Response without record in log file.
2: nothing at all!
3: record in log file</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Bug
Reported by vitaly@...
2006-05-15T19:31:55+00:00
PHP: 4.4.2 OS: Linux Package Version: 0.9.4

Description:
------------
Hi everybody. 
I have a problem with error reporting inside an object which generate response for SOAP request. I mean object::method() which called from SOAP_Server::callMethod().
In my current configuration I have log_errors enabled in php.ini. So, all errors is (should be) logged. But any error which appear inside SOAP Object isn't logged by default.
Well. If I have E_WARNING than I can see error in SOAP Response, but if there is an E_ERROR, which can't be handled by SOAP_Server::_errorHandler(), that's real problem because I don't see it either in SOAP Response or log file (probably because of error muting @, I'm not sure). 
So, to solve this problem I've deleted @ before call to SOAP Object method, added ini_set('display_errors', false) to hide all errors and added writing to log file in SOAP_Server::_errorHandler() if option enabled in configuration.
Patch file solving this problem to expected result can be downloaded from http://vitaly.yakovenko.net/soap/SOAP_Server.patch . Put it in pear directory and `patch -p0 &lt; SOAP_Server.patch`. 
Hope this will help. 
Regards. Vitali.

Test script:
---------------
&lt;?php

// Uncomment line by line to see result
function HandleRequest()
{
    //include 'asdf.php'; // 1: should generate E_WARNING
    //require 'asdf.php'; // 2: should generate E_ERROR
    //parse error here    // 3: should generate E_PARSE
}
?&gt;

Expected result:
----------------
1: E_WARNING wrapped in SOAP Response and record in log file.
2: at least something saying that error happened
3: at leat something saying that error happened.

Actual result:
--------------
1: E_WARNING wrapped in SOAP Response without record in log file.
2: nothing at all!
3: record in log file</pre>]]></description>
      <dc:date>2008-03-22T06:22:35+00:00</dc:date>
      <dc:creator>vitaly &amp;#x61;&amp;#116; yakovenko &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>SOAP Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/1701">
      <title>SOAP: Feature/Change Request 1701 [Verified] no documentation</title>
      <link>http://pear.php.net/bugs/1701</link>
      <content:encoded><![CDATA[<pre>SOAP Feature/Change Request
Reported by j8os7s8gkq6drmb@...
2004-06-22T03:42:49+00:00
PHP: Irrelevant OS: N/A Package Version: 

Description:
------------
There is no documentation for any pacakage past 0.7.4.  It would be most usefull to have a intro document that also covers among other things self generating wsdl, and the correct use of namespaces in parameters and mappings.

Reproduce code:
---------------
N/A

Expected result:
----------------
N/A

Actual result:
--------------
N/A</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Feature/Change Request
Reported by j8os7s8gkq6drmb@...
2004-06-22T03:42:49+00:00
PHP: Irrelevant OS: N/A Package Version: 

Description:
------------
There is no documentation for any pacakage past 0.7.4.  It would be most usefull to have a intro document that also covers among other things self generating wsdl, and the correct use of namespaces in parameters and mappings.

Reproduce code:
---------------
N/A

Expected result:
----------------
N/A

Actual result:
--------------
N/A</pre>]]></description>
      <dc:date>2008-03-22T06:21:05+00:00</dc:date>
      <dc:creator>j8os7s8gkq6drmb &amp;#x61;&amp;#116; jetable &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>SOAP Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/1404">
      <title>SOAP: Bug 1404 [Open] xsd:dateTime members in complex types are serialized as xsd:string</title>
      <link>http://pear.php.net/bugs/1404</link>
      <content:encoded><![CDATA[<pre>SOAP Bug
Reported by clawrence@...
2004-05-13T21:47:25+00:00
PHP: 4.3.6 OS: redhat 7.2 Package Version: 0.9.4

Description:
------------
DateTime members of complex types when used as output from a SOAP operation are mis-reported by PEAR::SOAP (0.8RC3 beta) as being string types (see echoDate2() for details).

The echoDate1() operation correctly reports the dateTime datatype primitive in it's response.

Reproduce code:
---------------
&lt;?php
set_magic_quotes_runtime(0);
ini_set(&quot;magic_quotes_gpc&quot;, 0);

class SOAPDateWrap {
  var $datefied;

  function SOAPDateWrap ($datefied = NULL) {
    $this-&gt;datefied = $datefied;
  }
}

require_once 'SOAP/Value.php';

class SOAPEchoDateService {
  var $__dispatch_map = array();
  var $__typedef = array();

  function SOAPEchoDateService() {
    // Define the SOAPDateWrap Type
    $this-&gt;__typedef['{http://www.optimiser.com/soap}SOAPDateWrap'] = array('datefied'     =&gt; 'dateTime');
    // Define the echoDate1 operation
    $this-&gt;__dispatch_map['echoDate1'] = array('in' =&gt; array('inDate' =&gt; 'dateTime'), 'out' =&gt; array('outDate' =&gt; 'dateTime'));
    // Define the echoDate2 operation
    $this-&gt;__dispatch_map['echoDate2'] = array('in'  =&gt; array('inDate' =&gt; 'dateTime'), 'out' =&gt; array('outDateWrap' =&gt; '{http://www.optimiser.com/soap}SOAPDateWrap'));
  }

  function __dispatch($methodname) {
    if (isset($this-&gt;__dispatch_map[$methodname]))
      return $this-&gt;__dispatch_map[$methodname];
    return NULL;
  }

  function echoDate1($inDate) {
    $outDate = $inDate;
    return new SOAP_Value('outDate', 'dateTime', $outDate);
  }

  function echoDate2($inDate) {
    $outDate = $inDate;
    return new SOAP_Value('outDateWrap', '{http://www.optimiser.com/soap}SOAPDateWrap', new SOAPDateWrap($outDate));
  }
}

require_once 'Log.php';
require_once 'SOAP/Server.php';

$log = &amp;Log::singleton('file', '/tmp/echoDate.log', 'echoDate', array('mode' =&gt; 0666), LOG_INFO);
$server = new SOAP_Server;
$server-&gt;_auto_translation = true;
$soapclass = new SOAPEchoDateService();
$server-&gt;addObjectMap($soapclass,'urn:SOAPEchoDate');
if (isset($_SERVER['REQUEST_METHOD']) &amp;&amp;
    $_SERVER['REQUEST_METHOD'] == 'POST') {
  $log-&gt;log(&quot;[&quot;.getmypid().&quot;] REQUEST: \n&quot;.$HTTP_RAW_POST_DATA);
  ob_start();
  $server-&gt;service($HTTP_RAW_POST_DATA);
  $log-&gt;log(&quot;[&quot;.getmypid().&quot;] RESPONSE: \n&quot;.ob_get_contents());
  ob_end_flush();
} else {
  require_once 'SOAP/Disco.php';
  $disco = new SOAP_DISCO_Server($server,'SOAPEchoDate');
  header(&quot;Content-type: text/xml&quot;);
  if (isset($_SERVER['QUERY_STRING'])
      &amp;&amp; strcasecmp($_SERVER['QUERY_STRING'], 'wsdl') == 0) {
    echo $disco-&gt;getWSDL();
  } else {
    echo $disco-&gt;getDISCO();
  }
  exit;
}

?&gt;

Expected result:
----------------
The datefied member of the SOAPDateWrap complex type returned from the echoDate2() operation should be of type xsd:dateTime as follows:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;

&lt;SOAP-ENV:Envelope  xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
 xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
 xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
 xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;
 xmlns:ns4=&quot;http://www.optimiser.com/soap&quot;
 xmlns:ns5=&quot;urn:SOAPEchoDate&quot;
 SOAP-ENV:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;
&lt;SOAP-ENV:Body&gt;

&lt;ns5:echoDate2Response&gt;
&lt;outDateWrap xsi:type=&quot;ns4:SOAPDateWrap&quot;&gt;
&lt;datefied xsi:type=&quot;xsd:dateTime&quot;&gt;2004-05-14T10:21:18.6939682+08:00&lt;/datefied&gt;&lt;/outDateWrap&gt;&lt;/ns5:echoDate2Response&gt;
&lt;/SOAP-ENV:Body&gt;
&lt;/SOAP-ENV:Envelope&gt;


Actual result:
--------------
The datefied member of the SOAPDateWrap complex type returned from the echoDate2() operation is of type xsd:string as follows:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;

&lt;SOAP-ENV:Envelope  xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
 xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
 xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
 xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;
 xmlns:ns4=&quot;http://www.optimiser.com/soap&quot;
 xmlns:ns5=&quot;urn:SOAPEchoDate&quot;
 SOAP-ENV:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;
&lt;SOAP-ENV:Body&gt;

&lt;ns5:echoDate2Response&gt;
&lt;outDateWrap xsi:type=&quot;ns4:SOAPDateWrap&quot;&gt;
&lt;datefied xsi:type=&quot;xsd:string&quot;&gt;2004-05-14T10:21:18.6939682+08:00&lt;/datefied&gt;&lt;/outDateWrap&gt;&lt;/ns5:echoDate2Response&gt;
&lt;/SOAP-ENV:Body&gt;
&lt;/SOAP-ENV:Envelope&gt;</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Bug
Reported by clawrence@...
2004-05-13T21:47:25+00:00
PHP: 4.3.6 OS: redhat 7.2 Package Version: 0.9.4

Description:
------------
DateTime members of complex types when used as output from a SOAP operation are mis-reported by PEAR::SOAP (0.8RC3 beta) as being string types (see echoDate2() for details).

The echoDate1() operation correctly reports the dateTime datatype primitive in it's response.

Reproduce code:
---------------
&lt;?php
set_magic_quotes_runtime(0);
ini_set(&quot;magic_quotes_gpc&quot;, 0);

class SOAPDateWrap {
  var $datefied;

  function SOAPDateWrap ($datefied = NULL) {
    $this-&gt;datefied = $datefied;
  }
}

require_once 'SOAP/Value.php';

class SOAPEchoDateService {
  var $__dispatch_map = array();
  var $__typedef = array();

  function SOAPEchoDateService() {
    // Define the SOAPDateWrap Type
    $this-&gt;__typedef['{http://www.optimiser.com/soap}SOAPDateWrap'] = array('datefied'     =&gt; 'dateTime');
    // Define the echoDate1 operation
    $this-&gt;__dispatch_map['echoDate1'] = array('in' =&gt; array('inDate' =&gt; 'dateTime'), 'out' =&gt; array('outDate' =&gt; 'dateTime'));
    // Define the echoDate2 operation
    $this-&gt;__dispatch_map['echoDate2'] = array('in'  =&gt; array('inDate' =&gt; 'dateTime'), 'out' =&gt; array('outDateWrap' =&gt; '{http://www.optimiser.com/soap}SOAPDateWrap'));
  }

  function __dispatch($methodname) {
    if (isset($this-&gt;__dispatch_map[$methodname]))
      return $this-&gt;__dispatch_map[$methodname];
    return NULL;
  }

  function echoDate1($inDate) {
    $outDate = $inDate;
    return new SOAP_Value('outDate', 'dateTime', $outDate);
  }

  function echoDate2($inDate) {
    $outDate = $inDate;
    return new SOAP_Value('outDateWrap', '{http://www.optimiser.com/soap}SOAPDateWrap', new SOAPDateWrap($outDate));
  }
}

require_once 'Log.php';
require_once 'SOAP/Server.php';

$log = &amp;Log::singleton('file', '/tmp/echoDate.log', 'echoDate', array('mode' =&gt; 0666), LOG_INFO);
$server = new SOAP_Server;
$server-&gt;_auto_translation = true;
$soapclass = new SOAPEchoDateService();
$server-&gt;addObjectMap($soapclass,'urn:SOAPEchoDate');
if (isset($_SERVER['REQUEST_METHOD']) &amp;&amp;
    $_SERVER['REQUEST_METHOD'] == 'POST') {
  $log-&gt;log(&quot;[&quot;.getmypid().&quot;] REQUEST: \n&quot;.$HTTP_RAW_POST_DATA);
  ob_start();
  $server-&gt;service($HTTP_RAW_POST_DATA);
  $log-&gt;log(&quot;[&quot;.getmypid().&quot;] RESPONSE: \n&quot;.ob_get_contents());
  ob_end_flush();
} else {
  require_once 'SOAP/Disco.php';
  $disco = new SOAP_DISCO_Server($server,'SOAPEchoDate');
  header(&quot;Content-type: text/xml&quot;);
  if (isset($_SERVER['QUERY_STRING'])
      &amp;&amp; strcasecmp($_SERVER['QUERY_STRING'], 'wsdl') == 0) {
    echo $disco-&gt;getWSDL();
  } else {
    echo $disco-&gt;getDISCO();
  }
  exit;
}

?&gt;

Expected result:
----------------
The datefied member of the SOAPDateWrap complex type returned from the echoDate2() operation should be of type xsd:dateTime as follows:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;

&lt;SOAP-ENV:Envelope  xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
 xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
 xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
 xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;
 xmlns:ns4=&quot;http://www.optimiser.com/soap&quot;
 xmlns:ns5=&quot;urn:SOAPEchoDate&quot;
 SOAP-ENV:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;
&lt;SOAP-ENV:Body&gt;

&lt;ns5:echoDate2Response&gt;
&lt;outDateWrap xsi:type=&quot;ns4:SOAPDateWrap&quot;&gt;
&lt;datefied xsi:type=&quot;xsd:dateTime&quot;&gt;2004-05-14T10:21:18.6939682+08:00&lt;/datefied&gt;&lt;/outDateWrap&gt;&lt;/ns5:echoDate2Response&gt;
&lt;/SOAP-ENV:Body&gt;
&lt;/SOAP-ENV:Envelope&gt;


Actual result:
--------------
The datefied member of the SOAPDateWrap complex type returned from the echoDate2() operation is of type xsd:string as follows:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;

&lt;SOAP-ENV:Envelope  xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
 xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
 xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
 xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;
 xmlns:ns4=&quot;http://www.optimiser.com/soap&quot;
 xmlns:ns5=&quot;urn:SOAPEchoDate&quot;
 SOAP-ENV:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;
&lt;SOAP-ENV:Body&gt;

&lt;ns5:echoDate2Response&gt;
&lt;outDateWrap xsi:type=&quot;ns4:SOAPDateWrap&quot;&gt;
&lt;datefied xsi:type=&quot;xsd:string&quot;&gt;2004-05-14T10:21:18.6939682+08:00&lt;/datefied&gt;&lt;/outDateWrap&gt;&lt;/ns5:echoDate2Response&gt;
&lt;/SOAP-ENV:Body&gt;
&lt;/SOAP-ENV:Envelope&gt;</pre>]]></description>
      <dc:date>2008-07-29T16:54:03+00:00</dc:date>
      <dc:creator>clawrence &amp;#x61;&amp;#116; optimiser &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>SOAP Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/1312">
      <title>SOAP: Bug 1312 [Open] bad XML parsing with nested arrays</title>
      <link>http://pear.php.net/bugs/1312</link>
      <content:encoded><![CDATA[<pre>SOAP Bug
Reported by eric.citaire@...
2004-04-29T05:31:59+00:00
PHP: 4.3.4 OS: Linux Package Version: 

Description:
------------
When sending a nested array to a PEAR::SOAP WebService, some elments are objects, not arrays.


Reproduce code:
---------------
My PHP code:

&lt;?php

// ...
// here is the method declaration:

                $this-&gt;__typedef['{urn:something}Array']       = array(array('item'=&gt;'anyType'));
                $this-&gt;__dispatch_map['test']   = array('in'=&gt;array('anArray'=&gt;'{urn:something}Array'));

// ...

?&gt;

The XML code the client send:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;SOAP-ENV:Envelope xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&lt;SOAP-ENV:Body xmlns:ns1=&quot;urn:something&quot;&gt;&lt;ns1:test SOAP-ENV:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;&lt;anArray soapenc:arrayType=&quot;xsd:anyType[4]&quot; xmlns:soapenc=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; xsi:type=&quot;soapenc:Array&quot;&gt;&lt;item soapenc:arrayType=&quot;xsd:string[0]&quot; xsi:type=&quot;soapenc:Array&quot; /&gt;&lt;item soapenc:arrayType=&quot;xsd:double[4]&quot; xsi:type=&quot;soapenc:Array&quot;&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;1&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;5&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;0&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;6&lt;/item&gt;&lt;/item&gt;&lt;item soapenc:arrayType=&quot;xsd:double[][3]&quot; xsi:type=&quot;soapenc:Array&quot;&gt;&lt;item soapenc:arrayType=&quot;xsd:double[3]&quot; xsi:type=&quot;soapenc:Array&quot;&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;8&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;9&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;1&lt;/item&gt;&lt;/item&gt;&lt;item soapenc:arrayType=&quot;xsd:double[0]&quot; xsi:type=&quot;soapenc:Array&quot; /&gt;&lt;item soapenc:arrayType=&quot;xsd:double[6]&quot; xsi:type=&quot;soapenc:Array&quot;&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;5&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;7&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;654&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;8&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;1&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;32&lt;/item&gt;&lt;/item&gt;&lt;/item&gt;&lt;item soapenc:arrayType=&quot;xsd:double[2]&quot; xsi:type=&quot;soapenc:Array&quot;&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;54&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;57&lt;/item&gt;&lt;/item&gt;&lt;/anArray&gt;&lt;/ns1:test&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;

Expected result:
----------------
array(4) {
  [0]=&gt;
  string(0) &quot;&quot;
  [1]=&gt;
  array(4) {
    [0]=&gt;
    float(1)
    [1]=&gt;
    float(5)
    [2]=&gt;
    float(0)
    [3]=&gt;
    float(6)
  }
  [2]=&gt;
  array(3) {
    [0]=&gt;
    array(3) {
      [0]=&gt;
      float(8)
      [1]=&gt;
      float(9)
      [2]=&gt;
      float(1)
    }
    [1]=&gt;
    float(0)
    [2]=&gt;
    array(6) {
      [0]=&gt;
      float(5)
      [1]=&gt;
      float(7)
      [2]=&gt;
      float(654)
      [3]=&gt;
      float(8)
      [4]=&gt;
      float(1)
      [5]=&gt;
      float(32)
    }
  }
  [3]=&gt;
  array(2) {
    [0]=&gt;
    float(54)
    [1]=&gt;
    float(57)
  }
}


Actual result:
--------------
array(1) {
  [&quot;anArray&quot;]=&gt;
  array(4) {
    [0]=&gt;
    string(0) &quot;&quot;
    [1]=&gt;
    array(4) {
      [0]=&gt;
      float(1)
      [1]=&gt;
      float(5)
      [2]=&gt;
      float(0)
      [3]=&gt;
      float(6)
    }
    [2]=&gt;
    object(stdClass)(1) {
      [&quot;item&quot;]=&gt;
      array(5) {
        [0]=&gt;
        float(8)
        [1]=&gt;
        float(9)
        [2]=&gt;
        float(1)
        [3]=&gt;
        string(0) &quot;&quot;
        [4]=&gt;
        array(6) {
          [0]=&gt;
          float(5)
          [1]=&gt;
          float(7)
          [2]=&gt;
          float(654)
          [3]=&gt;
          float(8)
          [4]=&gt;
          float(1)
          [5]=&gt;
          float(32)
        }
      }
    }
    [3]=&gt;
    array(2) {
      [0]=&gt;
      float(54)
      [1]=&gt;
      float(57)
    }
  }
}</pre>]]></content:encoded>
      <description><![CDATA[<pre>SOAP Bug
Reported by eric.citaire@...
2004-04-29T05:31:59+00:00
PHP: 4.3.4 OS: Linux Package Version: 

Description:
------------
When sending a nested array to a PEAR::SOAP WebService, some elments are objects, not arrays.


Reproduce code:
---------------
My PHP code:

&lt;?php

// ...
// here is the method declaration:

                $this-&gt;__typedef['{urn:something}Array']       = array(array('item'=&gt;'anyType'));
                $this-&gt;__dispatch_map['test']   = array('in'=&gt;array('anArray'=&gt;'{urn:something}Array'));

// ...

?&gt;

The XML code the client send:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;SOAP-ENV:Envelope xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&lt;SOAP-ENV:Body xmlns:ns1=&quot;urn:something&quot;&gt;&lt;ns1:test SOAP-ENV:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;&lt;anArray soapenc:arrayType=&quot;xsd:anyType[4]&quot; xmlns:soapenc=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; xsi:type=&quot;soapenc:Array&quot;&gt;&lt;item soapenc:arrayType=&quot;xsd:string[0]&quot; xsi:type=&quot;soapenc:Array&quot; /&gt;&lt;item soapenc:arrayType=&quot;xsd:double[4]&quot; xsi:type=&quot;soapenc:Array&quot;&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;1&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;5&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;0&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;6&lt;/item&gt;&lt;/item&gt;&lt;item soapenc:arrayType=&quot;xsd:double[][3]&quot; xsi:type=&quot;soapenc:Array&quot;&gt;&lt;item soapenc:arrayType=&quot;xsd:double[3]&quot; xsi:type=&quot;soapenc:Array&quot;&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;8&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;9&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;1&lt;/item&gt;&lt;/item&gt;&lt;item soapenc:arrayType=&quot;xsd:double[0]&quot; xsi:type=&quot;soapenc:Array&quot; /&gt;&lt;item soapenc:arrayType=&quot;xsd:double[6]&quot; xsi:type=&quot;soapenc:Array&quot;&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;5&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;7&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;654&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;8&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;1&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;32&lt;/item&gt;&lt;/item&gt;&lt;/item&gt;&lt;item soapenc:arrayType=&quot;xsd:double[2]&quot; xsi:type=&quot;soapenc:Array&quot;&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;54&lt;/item&gt;&lt;item xsi:type=&quot;xsd:double&quot;&gt;57&lt;/item&gt;&lt;/item&gt;&lt;/anArray&gt;&lt;/ns1:test&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;

Expected result:
----------------
array(4) {
  [0]=&gt;
  string(0) &quot;&quot;
  [1]=&gt;
  array(4) {
    [0]=&gt;
    float(1)
    [1]=&gt;
    float(5)
    [2]=&gt;
    float(0)
    [3]=&gt;
    float(6)
  }
  [2]=&gt;
  array(3) {
    [0]=&gt;
    array(3) {
      [0]=&gt;
      float(8)
      [1]=&gt;
      float(9)
      [2]=&gt;
      float(1)
    }
    [1]=&gt;
    float(0)
    [2]=&gt;
    array(6) {
      [0]=&gt;
      float(5)
      [1]=&gt;
      float(7)
      [2]=&gt;
      float(654)
      [3]=&gt;
      float(8)
      [4]=&gt;
      float(1)
      [5]=&gt;
      float(32)
    }
  }
  [3]=&gt;
  array(2) {
    [0]=&gt;
    float(54)
    [1]=&gt;
    float(57)
  }
}


Actual result:
--------------
array(1) {
  [&quot;anArray&quot;]=&gt;
  array(4) {
    [0]=&gt;
    string(0) &quot;&quot;
    [1]=&gt;
    array(4) {
      [0]=&gt;
      float(1)
      [1]=&gt;
      float(5)
      [2]=&gt;
      float(0)
      [3]=&gt;
      float(6)
    }
    [2]=&gt;
    object(stdClass)(1) {
      [&quot;item&quot;]=&gt;
      array(5) {
        [0]=&gt;
        float(8)
        [1]=&gt;
        float(9)
        [2]=&gt;
        float(1)
        [3]=&gt;
        string(0) &quot;&quot;
        [4]=&gt;
        array(6) {
          [0]=&gt;
          float(5)
          [1]=&gt;
          float(7)
          [2]=&gt;
          float(654)
          [3]=&gt;
          float(8)
          [4]=&gt;
          float(1)
          [5]=&gt;
          float(32)
        }
      }
    }
    [3]=&gt;
    array(2) {
      [0]=&gt;
      float(54)
      [1]=&gt;
      float(57)
    }
  }
}</pre>]]></description>
      <dc:date>2008-10-12T02:52:54+00:00</dc:date>
      <dc:creator>eric &amp;#x64;&amp;#111;&amp;#x74; citaire &amp;#x61;&amp;#116; laposte &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>SOAP Bug</dc:subject>
    </item>
</rdf:RDF>
