From:             adam at trachtenberg dot com
Operating system: n/a
PHP version:      5CVS-2005-01-29 (dev)
PHP Bug Type:     SOAP related
Bug description:  Cannot create SOAP header in no namespace

Description:
------------
You cannot create a SOAP header that is in no namespace. (This 
is required by the new Google Adwords SOAP API, see https://
adwords.google.com/api/adwords/v2/TrafficEstimatorService?
wsdl.)

Furthermore, the SOAPHeader class allows you to create headers 
in an empty namespace, by passing in null or "" for the 
namespace URI. This is illegal. (Unless defined as the default 
namespace.)

The extension should be changed to place these elements in no 
namespace instead.

Reproduce code:
---------------
$client=new SOAPClient(null, array('location' => 'http://localhost', 'uri'
=> 'myNS', 'exceptions' => false, 'trace' => true));

$header = new SOAPHeader(null, 'foo', 'bar');

$response= $client->__call('function', array(), null, $header);

print $client->__getLastRequest();


Expected result:
----------------
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/
soap/envelope/" xmlns:ns1="myNS" xmlns:xsd="http://www.w3.org/
2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/
encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/
soap/encoding/"><SOAP-ENV:Header><foo>bar<foo></SOAP-
ENV:Header><SOAP-ENV:Body><ns1:function/></SOAP-ENV:Body></
SOAP-ENV:Envelope>


Actual result:
--------------
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/
soap/envelope/" xmlns:ns1="myNS" xmlns:ns2="" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/
encoding/"><SOAP-ENV:Header><ns2:foo>bar</ns2:foo></SOAP-
ENV:Header><SOAP-ENV:Body><ns1:function/></SOAP-ENV:Body></
SOAP-ENV:Envelope>


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

Reply via email to