php-doc-en/reference/soap/functions/SoapHeader-SoapHeader.xml
Mehdi Achour 06c980ee99 See also
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@152556 c90b9560-bf6c-de11-be94-00142212c4b1
2004-02-27 16:36:36 +00:00

77 lines
2.8 KiB
XML

<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.SoapHeader-SoapHeader">
<refnamediv>
<refname>SoapHeader::SoapHeader</refname>
<refpurpose>
SoapHeader constructor
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>object</type><methodname>SoapHeader::SoapHeader</methodname>
<methodparam><type>string</type><parameter>namespace</parameter></methodparam>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>mustUnderstand</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>actor</parameter></methodparam>
</methodsynopsis>
<para>
SoapHeader is a special low-level class for passing or returning SOAP
headers. It is just a data holder and it does not have any special methods
except a constructor. It can be used in the <function>SoapClient::__call</function>
method to pass a SOAP header or in a SOAP header handler to return the header in
a SOAP response. <parameter>namespace</parameter> and <parameter>name</parameter>
are namespace and name of the SOAP header element. <parameter>data</parameter> is a SOAP
header's content. It can be a PHP value or SoapVar object.
<parameter>mustUnderstand</parameter> and <parameter>actor</parameter> are values for
<literal>mustUnderstand</literal> and <literal>actor</literal> attributes
of this SOAP Header element.
</para>
<para>
<example>
<title>Some examples</title>
<programlisting role="php">
<![CDATA[
<?php
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/"));
$client->__call("echoVoid", null, null,
new SoapHeader('http://soapinterop.org/echoheader/',
'echoMeStringRequest',
'hello world'));
?>
]]>
</programlisting>
</example>
</para>
<para>
See also
<function>SoapClient::__call</function>,
<function>SoapParam::SoapParam</function>, and
<function>SoapVar::SoapVar</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->