#33366 [NEW]: __soapCall Produces Incorrect Request
From: cmantunes at gmail dot com
Operating system: Debian
PHP version: 5.0.4
PHP Bug Type: SOAP related
Bug description: __soapCall Produces Incorrect Request
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 bug report at http://bugs.php.net/?id=33366&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33366&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33366&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33366&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33366&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33366&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33366&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33366&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33366&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33366&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33366&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33366&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33366&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33366&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33366&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33366&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33366&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33366&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33366&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33366&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33366&r=mysqlcfg
Thread (9 messages)
- cmantunes at gmail dot com