#32410 [Ver->Csd]: Documentation unclear for SoapHeader

From: Date: Mon, 23 Nov 2009 14:35:47 +0000
Subject: #32410 [Ver->Csd]: Documentation unclear for SoapHeader
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-3315@lists.php.net to get a copy of this message
ID: 32410 Updated by: vrana@php.net Reported By: gehrig at ishd dot de -Status: Verified +Status: Closed Bug Type: Documentation problem Operating System: Irrelevant PHP Version: Irrelevant New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2009-09-11 13:13:14] sjoerd@php.net Created bug #49530. ------------------------------------------------------------------------ [2009-09-10 12:47:27] sjoerd@php.net The paragraph mentioned in the original bug report is already removed. Suggestions to improve the documentation on SoapHeader: 1. Add a link to SoapServer::addSoapHeader to the "See also" section of SoapHeader::SoapHeader. 2. In the documentation of SoapServer::addSoapHeader, describe that the object is of type SoapHeader. 3. In the documentation of SoapClient::__setSoapHeaders, describe that soapheaders is either a SoapHeader or an array of SoapHeaders, or make a reference to the SoapHeader documentation. The previous comment from bisho at onirica notes some valid points about the calling of functions to handle Soap headers by the SoapServer. This is poorly documented and doesn't work reliably. However, I suggest creating a seperate bug report for that. ------------------------------------------------------------------------ [2008-01-08 15:42:38] bisho at onirica dot com I also miss information about this in the doc: If the header part "Example" has use="literal" the function with the same name ("Example") will be executed on the SoapServer. But: a) With use="encoded" nothing gets executed. This drove me crazy and should be mentioned on documentation. b) The function "Example" does not receive arguments. So, how you are supposed to process the header? I'm still trying to solve this. ------------------------------------------------------------------------ [2007-03-01 14:08:44] michiel at worthit dot nl When using SoapServer I too was in need for returning SoapHeaders. Confused by the documentation I started browsing the CVS and ended at http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/server023.phpt?view=markup&sortby=date, where the function 'addSoapHeader' is tested. Basically, you can define your headers like you should in your wsdl and then do something like this. --- function foo() { $server = $GLOBALS['server']; $server->addSoapHeader(new SoapHeader('my.wsdl', 'bar', true)); // optionally return data } $server = $GLOBALS['server'] = new SoapServer('my.wsdl'[, ...]); $server->addFunction('foo'); $server->handle(); --- I hope someone found this comment to be useful ;). ------------------------------------------------------------------------ [2007-02-26 09:38:57] philip@php.net David Mytton is documenting ref.SOAP, assigning this to him. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/32410 -- Edit this bug report at http://bugs.php.net/?id=32410&edit=1

« previous php.doc.bugs (#3315) next »