From:             pav at FreeBSD dot org
Operating system: any
PHP version:      5.1.4
PHP Bug Type:     SOAP related
Bug description:  namespaces added too late, leads to missing xsi:type 
attributes

Description:
------------
Changes made in libxml2 between version 2.6.23 and 2.6.24, exactly rev.
1.366 of tree.c, exactly added return(NULL) in xmlSetProp(), cause
attributes with unknown namespaces to be silently dropped, instead of
added into the document.

PHP SOAP extension, when making a client request, when running in
"encoded" mode, is adding xsi:type attributes to nodes (soap.c line 3948).
The xmlns:xsi namespace is added later in that function (soap.c line
4073).

Paired with the behaviour of a new libxml2 release, this leads to the
xsi:type attribute not being added.

Possible solution is to move if (use == ENCODED) block above the for (i =
0; i < arg_count; i++) block in serialize_function_call() in soap.c.

Reproduce code:
---------------
$client = new
SoapClient("https://oas.hide.vol.cz:4444/WS-NPLAN-context-root/WS_NPLAN?WSDL";,
array("trace"=>true));
$client->getProfil(4);

Expected result:
----------------
... <ns1:getprofil><profil
xsi:type="xsd:decimal">4</profil></ns1:getprofil> ...

Actual result:
--------------
... <ns1:getprofil><profil>4</profil></ns1:getprofil> ...

-- 
Edit bug report at http://bugs.php.net/?id=37523&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37523&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37523&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37523&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37523&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37523&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37523&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37523&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37523&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37523&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37523&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37523&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37523&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37523&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37523&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37523&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37523&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37523&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37523&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37523&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37523&r=mysqlcfg

Reply via email to