From:             
Operating system: Mac OS 10.4
PHP version:      5.3.2
Package:          SOAP related
Bug Type:         Bug
Bug description:SOAPServer does not use default argument values

Description:
------------
When calling a SOAP function or method in WSDL mode that has optional
arguments, the default value for those arguments will be ignored if the
SOAP request does not specify those parameters or sets them to nil.
Instead, the function will receive NULL for all such parameters.

Test script:
---------------
Here is a fully self-contained test script: http://pastebin.com/szEye5nv



The script writes the WSDL file to the system's temporary directory.

Expected result:
----------------
<?xml version="1.0" encoding="UTF-8"?>

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope";
xmlns:ns1="http://example.com/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:enc="http://www.w3.org/2003/05/soap-encoding";><env:Body
xmlns:rpc="http://www.w3.org/2003/05/soap-rpc";><ns1:exampleFunctionResponse
env:encodingStyle="http://www.w3.org/2003/05/soap-encoding";><rpc:result>return</rpc:result><return
xsi:type="xsd:string">param1 = 'SET', param2 = NULL, param3 = NULL, param4
= NULL</return></ns1:exampleFunctionResponse></env:Body></env:Envelope>

Actual result:
--------------
<?xml version="1.0" encoding="UTF-8"?>

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope";
xmlns:ns1="http://example.com/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:enc="http://www.w3.org/2003/05/soap-encoding";><env:Body
xmlns:rpc="http://www.w3.org/2003/05/soap-rpc";><ns1:exampleFunctionResponse
env:encodingStyle="http://www.w3.org/2003/05/soap-encoding";><rpc:result>return</rpc:result><return
xsi:type="xsd:string">param1 = 'SET', param2 = 'foo', param3 = 'bar',
param4 =
'baz'</return></ns1:exampleFunctionResponse></env:Body></env:Envelope>

-- 
Edit bug report at http://bugs.php.net/bug.php?id=52319&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52319&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52319&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52319&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52319&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52319&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52319&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52319&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52319&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52319&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52319&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52319&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52319&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52319&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52319&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52319&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52319&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52319&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52319&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52319&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52319&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52319&r=mysqlcfg

Reply via email to