php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #31953 SoapClient::setHeader
Submitted: 2005-02-13 11:35 UTC Modified: 2005-10-03 11:22 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: wico at cnh dot nl Assigned: dmitry (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 5.0.3 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: wico at cnh dot nl
New email:
PHP Version: OS:

 

 [2005-02-13 11:35 UTC] wico at cnh dot nl
Description:
------------
I think it's usefull to have a SoapClient::setHeader (or something like that) for soap servers that requires static headers (mostly with authentication parameters)

$soapHeader = new SoapHeader($ns, 'AuthHeader', array (
	'Username' => $user,
	'Password' => $pass
));

$soap = new SoapClient($wsdl, $options);

/* so you can do this: */
$soap->setHeader($soapHeader);
$soap->function1($parameters);
$soap->function2($parameters);
$soap->function3($parameters);

/*instead of this:*/
$soap = new SoapClient($wsdl, $options);
$soap->__soapCall('function1', $parameters, null, $soapHeader);
$soap->__soapCall('function2', $parameters, null, $soapHeader);
$soap->__soapCall('function3', $parameters, null, $soapHeader);



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-03 11:22 UTC] dmitry@php.net
SoapClient::__setSoapHeaders() was added into CVS HEAD, PHP_5_1 and PHP_5.0
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 16:01:34 2025 UTC