note 120198 added to soapserver.addsoapheader

From: Date: Mon, 21 Nov 2016 21:30:50 +0000
Subject: note 120198 added to soapserver.addsoapheader
Groups: php.notes 
Request: Send a blank email to php-notes+get-207319@lists.php.net to get a copy of this message
Notably addSoapHeaders() must be called within handling class/object. If you call addSoapHeaders() like this: $server = new SoapServer("some.wsdl"); $server->setObject(new Service()); $server->addSoapHeaders(new SoapHeader("ns", "Header", "value")); $server->handle(); Your SOAP header will not be added to the server response as it will be overwritten by result of handle() function. If you want to add SOAP headers to the resulting response you should make $server global/static variable and then call addSoapHeaders() from within of the method of Service class which will handle the request. ---- Server IP: 72.52.91.14 Probable Submitter: 185.108.90.45 ---- Manual Page -- http://php.net/manual/en/soapserver.addsoapheader.php Edit -- https://master.php.net/note/edit/120198 Del: integrated -- https://master.php.net/note/delete/120198/integrated Del: useless -- https://master.php.net/note/delete/120198/useless Del: bad code -- https://master.php.net/note/delete/120198/bad+code Del: spam -- https://master.php.net/note/delete/120198/spam Del: non-english -- https://master.php.net/note/delete/120198/non-english Del: in docs -- https://master.php.net/note/delete/120198/in+docs Del: other reasons-- https://master.php.net/note/delete/120198 Reject -- https://master.php.net/note/reject/120198 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#207319) next »