mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-26 22:08:55 +00:00

Added soap-soapclient-setsoapheaders.xml for missing SoapClient->__setSoapHeaders method. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@269496 c90b9560-bf6c-de11-be94-00142212c4b1
159 lines
4.5 KiB
XML
159 lines
4.5 KiB
XML
<?xml version='1.0' encoding='iso-8859-1'?>
|
|
<!-- $Revision: 1.6 $ -->
|
|
<refentry xml:id="function.soap-soapheader-construct" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>SoapHeader->__construct</refname>
|
|
<refpurpose>
|
|
SoapHeader constructor
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<classsynopsis>
|
|
<ooclass><classname>SoapHeader</classname></ooclass>
|
|
<constructorsynopsis>
|
|
<methodname>__construct</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>
|
|
</constructorsynopsis>
|
|
</classsynopsis>
|
|
<para>
|
|
Constructs a new <classname>SoapHeader</classname> object.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>namespace</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The namespace of the SOAP header element.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>name</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The name of the SOAP header element.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>data</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
A SOAP header's content. It can be a PHP value or a
|
|
<classname>SoapVar</classname> object.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>mustUnderstand</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Value of the <literal>mustUnderstand</literal> attribute of the SOAP
|
|
header element.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>actor</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Value of the <literal>actor</literal> attribute of the SOAP header
|
|
element.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Basic Example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
|
|
'uri' => "http://test-uri/"));
|
|
$client->__soapCall("echoVoid", null, null,
|
|
new SoapHeader('http://soapinterop.org/echoheader/',
|
|
'echoMeStringRequest',
|
|
'hello world'));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Complex Type With Attributes</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$client = new SoapClient('http://example.com/webservice.asmx?wsdl');
|
|
|
|
$attributes = array('attr1' => 'value1', 'attr2' => 'value2');
|
|
|
|
// the type_name and type_namespace parameters must be specified
|
|
// when specifying attributes
|
|
$complex_type = new SOAPVar($attributes,
|
|
SOAP_ENC_OBJECT,
|
|
'ComplexType', // type_name
|
|
'http://www.example.com/namespace', // type_namespace
|
|
'complex_type',
|
|
'http://www.example.com/namespace');
|
|
|
|
|
|
$header = new SOAPHeader('http://www.example.com/namespace',
|
|
'ComplexType',
|
|
$complex_type,
|
|
true);
|
|
|
|
$client->__soapCall("someFunc", null, null, $header);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><xref linkend="function.soap-soapclient-soapcall" /></member>
|
|
<member><xref linkend="function.soap-soapvar-construct" /></member>
|
|
<member><xref linkend="function.soap-soapparam-construct" /></member>
|
|
</simplelist>
|
|
</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
|
|
-->
|