mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 14:28:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@296056 c90b9560-bf6c-de11-be94-00142212c4b1
123 lines
3.2 KiB
XML
123 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="soapclient.setsoapheaders" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>SoapClient::__setSoapHeaders</refname>
|
|
<refpurpose>Sets SOAP headers for subsequent calls</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>bool</type><methodname>SoapClient::__setSoapHeaders</methodname>
|
|
<methodparam choice="opt"><type>mixed</type><parameter>soapheaders</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Defines headers to be sent along with the SOAP requests.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Calling this method will replace any previous values.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>soapheaders</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The headers to be set. It could be <classname>SoapHeader</classname>
|
|
object or array of <classname>SoapHeader</classname> objects.
|
|
If not specified or set to &null;, the headers will be deleted.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>SoapClient::__setSoapHeaders</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
|
|
'uri' => "http://test-uri/"));
|
|
$header = new SoapHeader('http://soapinterop.org/echoheader/',
|
|
'echoMeStringRequest',
|
|
'hello world');
|
|
|
|
$client->__setSoapHeaders($header);
|
|
|
|
$client->__soapCall("echoVoid", null);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Set Multiple Headers</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
|
|
'uri' => "http://test-uri/"));
|
|
$headers = array();
|
|
|
|
$headers[] = new SoapHeader('http://soapinterop.org/echoheader/',
|
|
'echoMeStringRequest',
|
|
'hello world');
|
|
|
|
$headers[] = new SoapHeader('http://soapinterop.org/echoheader/',
|
|
'echoMeStringRequest',
|
|
'hello world again');
|
|
|
|
$client->__setSoapHeaders($headers);
|
|
|
|
$client->__soapCall("echoVoid", null);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</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:"~/.phpdoc/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
|
|
-->
|