|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-13 23:29 UTC] felipe@php.net
[2009-02-21 01:00 UTC] php-bugs at lists dot php dot net
[2009-04-17 17:06 UTC] jchernia1 at yahoo dot com
[2009-06-11 15:41 UTC] ctbh at mailinator dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 07:00:01 2025 UTC |
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"