#32410 [Com]: Documentation unclear for SoapHeader
| From: | bisho at onirica dot com | Date: | Tue, 08 Jan 2008 15:42:41 +0000 |
| Subject: | #32410 [Com]: Documentation unclear for SoapHeader | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-424@lists.php.net to get a copy of this message | ||
ID: 32410
Comment by: bisho at onirica dot com
Reported By: gehrig at ishd dot de
Status: Assigned
Bug Type: Documentation problem
Operating System: Irrelevant
PHP Version: Irrelevant
Assigned To: dmytton
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
[2005-12-23 08:07:07] cat_lan at 163 dot com
Sorry, my english is poor, see code below:
-------------------------
function foo()
{
return new soapHeader(...);
}
soapServer::addFunction("foo");
--------------------------
---about the function name "foo":
.wsdl----------------------->|
<header message="..." part="foo" use="literal" />
post data------------------->|
<soap:Header><foo>........</foo></soap:Header>
------------------------------------------------------------------------
[2005-07-09 20:25:17] jplush76 at gmail dot com
I agree it would be nice to have more information here. Soap headers
are a big part of web services and the manual treats them as a glace
over
------------------------------------------------------------------------
[2005-04-03 11:59:57] gehrig at ishd dot de
On http://www.php3.de/soap there is a section headed
"SoapHeader". In
this section the manual states:
"SoapHeader is a special low-level class for passing or returning SOAP
headers. It's just a data holder and it does not have any special
methods except its constructor. It can be used in the
SoapClient->__soapCall() method to pass a SOAP header or in a SOAP
header handler to return the header in a SOAP response."
But it doesn't mention how to implement a, what it calls, "SOAP header
handler". I'd like to receive a header in a SOAP request to a
PhP5-SOAP-server (which is no problem at all) and I'd like to send back
a header in the SOAP response from this server - but I have no clue how
to do this.
------------------------------------------------------------------------
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