ID: 46096 Updated by: [email protected] Reported By: alberto at edistar dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: linux Ubuntu (kernel: 2.6.17) PHP Version: 5.2.6 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2008-09-16 16:19:09] alberto at edistar dot com Description: ------------ I need to add an http header to a Soap request using SoapClient class. The way I found in documentation is using 'stream_context' of '$options' constructor's parameter. But the class doesn't consider that option, either in "wsdl" mode and "non wsdl" mode. So the target web service doesn't receive the added http header. Reproduce code: --------------- $additionalHeader = array( 'http'=>array('header' => "Token: 123")); $context = stream_context_create($additionalHeader); $clientSoap = new SOAPClient('http://yoururl/yourwsdl.wsdl', array('trace' => 1, 'stream_context' => $context, 'exceptions' => false)); $clientSoap->yourMethod($yourParameter); Expected result: ---------------- Target web service receives an http header named 'Token' with value "123" Actual result: -------------- Target web service doesn't receive an http header named 'Token' with value "123" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46096&edit=1
