PackageBase
PackageBase copied to clipboard
Update AbstractSoapClientBase.php
As an enhancement (?) , for those who need to change the http header globally, we could allow stream_context to be passed through options once so it would not be necessary to call setHttpHeader() before each request.
The code for including some header would be :
$options = array( \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_URL => 'https://somewebservice?wsdl', \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_CLASSMAP => ClassMap::get(), );
$aHTTP['http']['header'] = "myheader: myheadervalue"; $context = stream_context_create($aHTTP); $options2=array_merge($options,array("stream_context" => $context));
$someservice = new \ServiceType\SomeServiceClass($options2);
includes fix from fougere2713/42_php8_compatibility_fix