#46096 [Com]: SoapClient constructor:'stream_context' key of 'options' parameter is not used

From: Date: Fri, 17 Apr 2009 17:06:01 +0000
Subject: #46096 [Com]: SoapClient constructor:'stream_context' key of 'options' parameter is not used
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-135932@lists.php.net to get a copy of this message
ID: 46096 Comment by: jchernia1 at yahoo dot com Reported By: alberto at edistar dot com Status: No Feedback Bug Type: SOAP related Operating System: linux Ubuntu (kernel: 2.6.17) PHP Version: 5.2.6 New Comment: This looks like a dupe of 46427 Previous Comments: ------------------------------------------------------------------------ [2009-02-21 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2009-02-13 23:29:33] felipe@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [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

« previous php.bugs (#135932) next »