php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73327 Problem with SOAP (NOT RESOLVED)
Submitted: 2016-10-17 07:54 UTC Modified: 2016-10-17 07:57 UTC
From: matteo dot veggia at gmail dot com Assigned:
Status: Duplicate Package: SOAP related
PHP Version: 7.0.12 OS: Windows x64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
14 - 12 = ?
Subscribe to this entry?

 
 [2016-10-17 07:54 UTC] matteo dot veggia at gmail dot com
Description:
------------
I will report an issue reported in 15-09-2016 in this link https://bugs.php.net/bug.php?id=73089. 

The problem IS NOT RESOLVED.


I will be short: i have an WCF in a IIS Windows Server. This WCF host a web service with this function:

public Dictionary<string, string> TestRoutine(Dictionary<string, string> Data)

I calling this function with PHP with these rows:

$url = "http://testserver/test/test.svc?wsdl";
$soapClient = new SoapClient($url, array('cache_wsdl' => WSDL_CACHE_NONE) );
$argsSOAP = new StdClass();
$argsSOAP->Data = Array();
array_push($argsSOAP->Data, Array("Key"=>"A", "Value"=>"1"));
array_push($argsSOAP->Data, Array("Key"=>"B", "Value"=>"2"));
$resSOAP = $soapClient->TestRoutine($argsSOAP);
print_r($resSOAP);

In PHP 5.6.X these rows works! In PHP 7.0.11 NO! The "Data" parameter result empty

BUT

If I put the values into the dictionary with a direct assignment, not using "array_push":

$url = "http://testserver/test/test.svc?wsdl";
$soapClient = new SoapClient($url, array('cache_wsdl' => WSDL_CACHE_NONE) );
$argsSOAP = new StdClass();
$argsSOAP->Data = Array();
$argsSOAP->Data[0] = Array("Key"=>"A", "Value"=>"1");
$argsSOAP->Data[1] = Array("Key"=>"B", "Value"=>"2");
$resSOAP = $soapClient->TestRoutine($argsSOAP);
print_r($resSOAP);

IT WORKS!!! Why?
Can you check? My PHP application is all based with array_push. Please help
Thanks

Matteo V.




Test script:
---------------
$url = "http://testserver/test/test.svc?wsdl";
$soapClient = new SoapClient($url, array('cache_wsdl' => WSDL_CACHE_NONE) );
$argsSOAP = new StdClass();
$argsSOAP->Data = Array();
array_push($argsSOAP->Data, Array("Key"=>"A", "Value"=>"1"));
array_push($argsSOAP->Data, Array("Key"=>"B", "Value"=>"2"));
$resSOAP = $soapClient->TestRoutine($argsSOAP);
print_r($resSOAP);

Expected result:
----------------
The web service receive a dictionary with two element

Actual result:
--------------
The web service receive a null element!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-17 07:57 UTC] requinix@php.net
-Status: Open +Status: Duplicate
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC