Bug #73089 [ReO]: SOAP pass dictionary parameter

From: Date: Mon, 24 Oct 2016 12:40:42 +0000
Subject: Bug #73089 [ReO]: SOAP pass dictionary parameter
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204985@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73089&edit=1

 ID:                 73089
 User updated by:    matteo dot veggia at gmail dot com
 Reported by:        matteo dot veggia at gmail dot com
 Summary:            SOAP pass dictionary parameter
 Status:             Re-Opened
 Type:               Bug
 Package:            SOAP related
 Operating System:   Windows
 PHP Version:        7.0.12
 Block user comment: N
 Private report:     N

 New Comment:

Any news? I need this fix...


Previous Comments:
------------------------------------------------------------------------
[2016-10-18 12:59:04] matteo dot veggia at gmail dot com

I also tried the two methods with PHP version 5.6.9: the results are same:

<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"
xmlns:ns2="http://tempuri.org/">
<SOAP-ENV:Body> <ns2:TestRoutineDictionary> <ns2:Data>
<ns1:KeyValueOfstringstring> <ns1:Key>A</ns1:Key>
<ns1:Value>1</ns1:Value> </ns1:KeyValueOfstringstring>
<ns1:KeyValueOfstringstring> <ns1:Key>B</ns1:Key>
<ns1:Value>2</ns1:Value> </ns1:KeyValueOfstringstring> </ns2:Data>
</ns2:TestRoutineDictionary> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

------------------------------------------------------------------------
[2016-10-17 14:42:31] matteo dot veggia at gmail dot com

Yeah, i'm running php 7.0.12 (phpinfo()... if you want more information tell me please).
Using the SoapClient::__getLastRequest() routine I have these results:

$soapClient->__getLastRequest()
Using array_push
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://tempuri.org/">
<SOAP-ENV:Body> <ns1:TestRoutineDictionary> <ns1:Data/>
</ns1:TestRoutineDictionary> </SOAP-ENV:Body> </SOAP-ENV:Envelope> 

Using index assign
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"
xmlns:ns2="http://tempuri.org/">
<SOAP-ENV:Body> <ns2:TestRoutineDictionary> <ns2:Data>
<ns1:KeyValueOfstringstring> <ns1:Key>A</ns1:Key>
<ns1:Value>1</ns1:Value> </ns1:KeyValueOfstringstring>
<ns1:KeyValueOfstringstring> <ns1:Key>B</ns1:Key>
<ns1:Value>2</ns1:Value> </ns1:KeyValueOfstringstring> </ns2:Data>
</ns2:TestRoutineDictionary> </SOAP-ENV:Body> </SOAP-ENV:Envelope> 

I think these informations can help you.
Best regards
Matteo V.

------------------------------------------------------------------------
[2016-10-17 13:37:53] nikic@php.net

This is the param encoding I get on PHP 7.0.12:

         <param0 xsi:type="SOAP-ENC:Struct">
            <Data SOAP-ENC:arrayType="ns2:Map[2]"
xsi:type="SOAP-ENC:Array">
               <item xsi:type="ns2:Map">
                  <item>
                     <key xsi:type="xsd:string">Key</key>
                     <value xsi:type="xsd:string">A</value>
                  </item>
                  <item>
                     <key xsi:type="xsd:string">Value</key>
                     <value xsi:type="xsd:string">1</value>
                  </item>
               </item>
               <item xsi:type="ns2:Map">
                  <item>
                     <key xsi:type="xsd:string">Key</key>
                     <value xsi:type="xsd:string">B</value>
                  </item>
                  <item>
                     <key xsi:type="xsd:string">Value</key>
                     <value xsi:type="xsd:string">2</value>
                  </item>
               </item>
            </Data>
         </param0>

Not knowing anything about SOAP specifically, it looks correct to me. Are you sure you are running
PHP 7.0.12?

------------------------------------------------------------------------
[2016-10-17 07:57:58] requinix@php.net

Bug #73327 says this isn't resolved in 7.0.12.

------------------------------------------------------------------------
[2016-09-15 13:38:21] nikic@php.net

Duplicate of bug #71996, which will be fixed in PHP 7.0.12.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=73089


--
Edit this bug report at https://bugs.php.net/bug.php?id=73089&edit=1


Thread (28 messages)

« previous php.bugs (#204985) next »