#33366 [Fbk->Opn]: __soapCall Produces Incorrect Request
| From: | cmantunes at gmail dot com | Date: | Thu, 16 Jun 2005 18:33:29 +0000 |
| Subject: | #33366 [Fbk->Opn]: __soapCall Produces Incorrect Request | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-80477@lists.php.net to get a copy of this message | ||
ID: 33366
User updated by: cmantunes at gmail dot com
Reported By: cmantunes at gmail dot com
-Status: Feedback
+Status: Open
Bug Type: SOAP related
Operating System: Debian
-PHP Version: 5.0.4
+PHP Version: 5.1.0
New Comment:
As requested, I attempted the same code with the latest snapshot
(php5-200506161630) but __soapCall continues to exhibit the same buggy
behavior as before. As such, the problem doesn't appear to have been
corrected yet. Thank you!
Previous Comments:
------------------------------------------------------------------------
[2005-06-16 18:56:00] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-06-16 18:44:22] cmantunes at gmail dot com
Description:
------------
When using SoapClient->__soapCall with parameters, the request is
incorrectly encoded regarding the method parameters. The first
SoapParam is also ignored.
Reproduce code:
---------------
#!/usr/bin/php
<?php
// AdWords API name space
$ns="https://adwords.google.com/api/adwords/v2";
// InfoService client
$isc=new SoapClient($ns . '/InfoService?wsdl',
array('trace'=>1, 'exceptions'=>1)
);
try
{
//
// BUG: __soapCall *IGNORES* the first parameter!
// That's why 'null' is being used
//
$params=array(null,
new SoapParam('2005-04-01', 'startDate'),
new SoapParam('2005-04-30', 'endDate'));
//
// BUG: This Call produces:
// <ns1:getOperationCount/> ->CLOSED ALREADY!
// <startDate>2005-04-01</startDate>
// <endDate>2005-04-30</endDate>
//
$isc->__soapCall('getOperationCount', $params);
}
catch (Exception $e)
{
print_r($e);
}
print "Request:\n\n" .
$isc->__getLastRequest() . "\n\n\n";
print "Response:\n\n" .
$isc->__getLastResponse() . "\n\n\n";
?>
Expected result:
----------------
<ns1:getOperationCount>
<startDate>2005-04-01</startDate>
<endDate>2005-04-30</endDate>
</ns1:getOperationCount>
Actual result:
--------------
<ns1:getOperationCount/>
<startDate>2005-04-01</startDate>
<endDate>2005-04-30</endDate>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33366&edit=1