mirror of
https://github.com/php/doc-ru.git
synced 2025-08-15 23:42:35 +00:00
new
git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@342372 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
48
reference/soap/soapheader/construct.xml
Normal file
48
reference/soap/soapheader/construct.xml
Normal file
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: af4410a7e15898c3dbe83d6ea38246745ed9c6fb Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapheader.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapHeader::__construct</refname>
|
||||
<refpurpose>Конструктор SoapHeader</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<methodname>SoapHeader::__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>string</type><parameter>actor</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
&info.function.alias; <methodname>SoapHeader::SoapHeader</methodname>
|
||||
</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
|
||||
-->
|
130
reference/soap/soapheader/soapheader.xml
Normal file
130
reference/soap/soapheader/soapheader.xml
Normal file
@ -0,0 +1,130 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: d3c871ae1e218ab417e15731c9dee930149baad0 Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapheader.soapheader" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapHeader::SoapHeader</refname>
|
||||
<refpurpose>Конструктор SoapHeader</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<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><initializer>false</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>actor</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Создает новый объект SoapHeader.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>namespace</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Пространство имен для элемента заголовка SOAP.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Имя объекта SoapHeader.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Контент заголовка SOAP. Может быть как значением PHP, так и объектом
|
||||
<classname>SoapVar</classname>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mustUnderstand</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Значение аттрибута <literal>mustUnderstand</literal> заголовка SOAP.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>actor</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Значение аттрибута <literal>actor</literal> заголовка SOAP.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Пример использования <function>SoapHeader::SoapHeader</function></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>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>SoapClient::__soapCall</methodname></member>
|
||||
<member><methodname>SoapVar::SoapVar</methodname></member>
|
||||
<member><methodname>SoapParam::SoapParam</methodname></member>
|
||||
<member><methodname>SoapServer::addSoapHeader</methodname></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:"~/.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
|
||||
-->
|
45
reference/soap/soapparam/construct.xml
Normal file
45
reference/soap/soapparam/construct.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: af4410a7e15898c3dbe83d6ea38246745ed9c6fb Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapparam.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapParam::__construct</refname>
|
||||
<refpurpose>Конструктор SoapParam</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<methodname>SoapParam::__construct</methodname>
|
||||
<methodparam><type>mixed</type><parameter>data</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
&info.function.alias; <methodname>SoapParam::SoapParam</methodname>
|
||||
</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
|
||||
-->
|
101
reference/soap/soapparam/soapparam.xml
Normal file
101
reference/soap/soapparam/soapparam.xml
Normal file
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: af4410a7e15898c3dbe83d6ea38246745ed9c6fb Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapparam.soapparam" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapParam::SoapParam</refname>
|
||||
<refpurpose>Конструктор SoapParam</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<methodname>SoapParam::SoapParam</methodname>
|
||||
<methodparam><type>mixed</type><parameter>data</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Создает новый объект <classname>SoapParam</classname>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Данные для передачи или возврата. Этот параметр можно напрямую задать
|
||||
значением PHP, но в этом случае он будет назван <literal>paramN</literal> и
|
||||
сервис SOAP может его не понять.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Имя параметра.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Пример использования <function>SoapParam::SoapParam</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$client = new SoapClient(null,array('location' => "http://localhost/soap.php",
|
||||
'uri' => "http://test-uri/"));
|
||||
$client->SomeFunction(new SoapParam($a, "a"),
|
||||
new SoapParam($b, "b"),
|
||||
new SoapParam($c, "c"));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>SoapClient::__soapCall</methodname></member>
|
||||
<member><methodname>SoapVar::SoapVar</methodname></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:"~/.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
|
||||
-->
|
124
reference/soap/soapserver/addfunction.xml
Normal file
124
reference/soap/soapserver/addfunction.xml
Normal file
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 28ac74c88c4852d494e9f513f81a19edf44dc577 Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapserver.addfunction" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapServer::addFunction</refname>
|
||||
<refpurpose>Добавляет одну или более функций для обработки запросов SOAP</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>SoapServer::addFunction</methodname>
|
||||
<methodparam><type>mixed</type><parameter>functions</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Экспортирует одну или несколько функций удаленному клиенту
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>functions</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Для экспорта одной функции, передайте в этот параметр ее имя в виде строки.
|
||||
</para>
|
||||
<para>
|
||||
Для экспорта нескольких функций, передайте в этот параметр массив с именами функций.
|
||||
</para>
|
||||
<para>
|
||||
Для экспорта всех функций, задайте параметр константой <constant>SOAP_FUNCTIONS_ALL</constant>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Параметр <parameter>functions</parameter> должен принимать все входящие
|
||||
аргументы в том же порядке, как они определены в файле WSDL (они не должны
|
||||
принимать никаких возвращаемых параметров в качестве аргументов) и должны
|
||||
возвращать одно или больше значений. Для возврата нескольких значений,
|
||||
они должны возвращать массив с именованными возвращаемыми параметрами.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Пример использования <function>SoapServer::addFunction</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
function echoString($inputString)
|
||||
{
|
||||
return $inputString;
|
||||
}
|
||||
|
||||
$server->addFunction("echoString");
|
||||
|
||||
function echoTwoStrings($inputString1, $inputString2)
|
||||
{
|
||||
return array("outputString1" => $inputString1,
|
||||
"outputString2" => $inputString2);
|
||||
}
|
||||
$server->addFunction(array("echoString", "echoTwoStrings"));
|
||||
|
||||
$server->addFunction(SOAP_FUNCTIONS_ALL);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>SoapServer::SoapServer</methodname></member>
|
||||
<member><methodname>SoapServer::setClass</methodname></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:"~/.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
|
||||
-->
|
67
reference/soap/soapserver/addsoapheader.xml
Normal file
67
reference/soap/soapserver/addsoapheader.xml
Normal file
@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1613146e324119c9aca51e5cc98b873b2dde2998 Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapserver.addsoapheader" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapServer::addSoapHeader</refname>
|
||||
<refpurpose>Добавить заголовок SOAP в ответ</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>SoapServer::addSoapHeader</methodname>
|
||||
<methodparam><type>SoapHeader</type><parameter>object</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Добавляет заголовок SOAP в возвращаемый ответ на текущий запрос..
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Объект SoapHeader.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</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
|
||||
-->
|
45
reference/soap/soapserver/construct.xml
Normal file
45
reference/soap/soapserver/construct.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: d8b968e63cba67a082e6e37aee1ebe7821b41258 Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapserver.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapServer::__construct</refname>
|
||||
<refpurpose>Конструктор SoapServer</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <methodname>SoapServer::__construct</methodname>
|
||||
<methodparam><type>mixed</type><parameter>wsdl</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
&info.function.alias; <methodname>SoapServer::SoapServer</methodname>
|
||||
</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
|
||||
-->
|
117
reference/soap/soapserver/fault.xml
Normal file
117
reference/soap/soapserver/fault.xml
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: af4410a7e15898c3dbe83d6ea38246745ed9c6fb Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapserver.fault" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapServer::fault</refname>
|
||||
<refpurpose>Вынуждает SoapServer вернуть ошибку</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>SoapServer::fault</methodname>
|
||||
<methodparam><type>string</type><parameter>code</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>actor</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>details</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>name</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Послать клиенту ответ обозначающий ошибку в ответ на текущий запрос.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Может быть вызвана только во время обработки запроса.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>code</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Код возвращаемой ошибки
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Краткое сообщение об ошибке
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>actor</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Строка, идентифицирующая актор вызвавший ошибку
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>details</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Детальная информация об ошибке
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Имя ошибки. Может использоваться для выбора имени из WSDL-файла.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>SoapFault::SoapFault</methodname></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:"~/.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
|
||||
-->
|
96
reference/soap/soapserver/getfunctions.xml
Normal file
96
reference/soap/soapserver/getfunctions.xml
Normal file
@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: af4410a7e15898c3dbe83d6ea38246745ed9c6fb Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapserver.getfunctions" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapServer::getFunctions</refname>
|
||||
<refpurpose>Вернуть список определенных функций</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>array</type><methodname>SoapServer::getFunctions</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Вернуть список функций определенных в объекте SoapServer.
|
||||
Этот метод возвращает список всех функций добавленных с помощью
|
||||
<methodname>SoapServer::addFunction</methodname> или
|
||||
<methodname>SoapServer::setClass</methodname>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<literal>Массив</literal> определенных функций.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Пример использования <function>SoapServer::getFunctions</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$server = new SoapServer(NULL, array("uri" => "http://test-uri"));
|
||||
$server->addFunction(SOAP_FUNCTIONS_ALL);
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
$server->handle();
|
||||
} else {
|
||||
echo "This SOAP server can handle following functions: ";
|
||||
$functions = $server->getFunctions();
|
||||
foreach($functions as $func) {
|
||||
echo $func . "\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>SoapServer::SoapServer</methodname></member>
|
||||
<member><methodname>SoapServer::addFunction</methodname></member>
|
||||
<member><methodname>SoapServer::setClass</methodname></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:"~/.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
|
||||
-->
|
100
reference/soap/soapserver/handle.xml
Normal file
100
reference/soap/soapserver/handle.xml
Normal file
@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: af4410a7e15898c3dbe83d6ea38246745ed9c6fb Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapserver.handle" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapServer::handle</refname>
|
||||
<refpurpose>Обработка SOAP-запроса</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>SoapServer::handle</methodname>
|
||||
<methodparam choice="opt"><type>string</type><parameter>soap_request</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Обрабатывает SOAP-запрос, вызывает необходимые функции и отправляет ответ клиенту.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>soap_request</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
SOAP-запрос. если аргумент не задан, то запросом будут считаться сырые данные
|
||||
POST из HTTP-запроса.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Пример использования <function>SoapServer::handle</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
function test($x)
|
||||
{
|
||||
return $x;
|
||||
}
|
||||
|
||||
$server = new SoapServer(null, array('uri' => "http://test-uri/"));
|
||||
$server->addFunction("test");
|
||||
$server->handle();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>SoapServer::SoapServer</methodname></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:"~/.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
|
||||
-->
|
78
reference/soap/soapserver/setobject.xml
Normal file
78
reference/soap/soapserver/setobject.xml
Normal file
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 69628755f76215e9b7fbcca1cf80a1faf0442afe Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapserver.setobject" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapServer::setObject</refname>
|
||||
<refpurpose>Устанавливает объект, который будет использоваться для обработки SOAP-запросов</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>SoapServer::setObject</methodname>
|
||||
<methodparam><type>object</type><parameter>object</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Устанавливает объект, который будет использоваться для обработки SOAP-запросов, а
|
||||
не просто класс, как в <methodname>SoapServer::setClass</methodname>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Объект для обработки запросов.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>SoapServer::setClass</methodname></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:"~/.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
|
||||
-->
|
154
reference/soap/soapserver/setpersistence.xml
Normal file
154
reference/soap/soapserver/setpersistence.xml
Normal file
@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 555841922ae2f9298d1affdbe0700cbf0a91d404 Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapserver.setpersistence" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapServer::setPersistence</refname>
|
||||
<refpurpose>Устанавливает режим сохранения SoapServer</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>SoapServer::setPersistence</methodname>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Эта функция позволяет изменять режим сохранения объекта SoapServer между
|
||||
запросами. Эта функция позволяет сохранять данные между запросами используя
|
||||
механизм сессий PHP. Этот метод влияет только на SoapServer после экспорта функций
|
||||
используя <methodname>SoapServer::setClass</methodname>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Сохранение <constant>SOAP_PERSISTENCE_SESSION</constant> гарантирует
|
||||
сохранение только объектов заданного класса, но не значение статических полей.
|
||||
Так что используйте <varname>$this->bar</varname>, а не self::$bar.
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<para>
|
||||
<constant>SOAP_PERSISTENCE_SESSION</constant> сериализует данные объекта
|
||||
класса и сохраняет их между запросами. Для корректной работы с ресурсами
|
||||
(например <classname>PDO</classname>),
|
||||
должны использоваться магические методы
|
||||
<link linkend="object.wakeup">__wakeup()</link> и
|
||||
<link linkend="object.sleep">__sleep()</link>.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Одна из констант <literal>SOAP_PERSISTENCE_XXX</literal>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>SOAP_PERSISTENCE_REQUEST</constant> - данные SoapServer не сохраняются
|
||||
между запросами. Это поведение <emphasis role="bold">по умолчанию</emphasis>
|
||||
любого объекта SoapServer после вызова setClass.
|
||||
</para>
|
||||
<para>
|
||||
<constant>SOAP_PERSISTENCE_SESSION</constant> - данные SoapServer сохраняются
|
||||
между запросами. Это достигается путем сериализации объекта SoapServer в
|
||||
<varname>$_SESSION['_bogus_session_name']</varname>, следовательно
|
||||
необходимо вызвать <function>session_start</function> перед включением этого режима.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Пример использования <function>SoapServer::setPersistence</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
class MyFirstPersistentSoapServer {
|
||||
private $resource; // (Such as PDO, mysqli, etc..)
|
||||
public $myvar1;
|
||||
public $myvar2;
|
||||
|
||||
public function __construct() {
|
||||
$this->__wakeup(); // Вызываем __wakeup для пересоздания $resource
|
||||
}
|
||||
|
||||
public function __wakeup() {
|
||||
$this->resource = CodeToStartOurResourceUp();
|
||||
}
|
||||
|
||||
public function __sleep() {
|
||||
// Не сохраняем $resource здесь.
|
||||
// Ошибка в этом методе приведет к тому, что при последующей десериализации
|
||||
// мы не сможем восстановить состояние объекта.
|
||||
return array('myvar1','myvar2');
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
session_start();
|
||||
$server = new SoapServer(null, array('uri' => $_SERVER['REQUEST_URI']));
|
||||
$server->setClass('MyFirstPersistentSoapServer');
|
||||
// setPersistence НЕОБХОДИМО вызвать после setClass, поскольку setClass
|
||||
// принудительно устанавливает SESSION_PERSISTENCE_REQUEST.
|
||||
$server->setPersistence(SOAP_PERSISTENCE_SESSION);
|
||||
$server->handle();
|
||||
} catch(SoapFault $e) {
|
||||
error_log("SOAP ERROR: ". $e->getMessage());
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>SoapServer::setClass</methodname></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:"~/.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
|
||||
-->
|
170
reference/soap/soapserver/soapserver.xml
Normal file
170
reference/soap/soapserver/soapserver.xml
Normal file
@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: d4146369d389293ed3de75816b1dc039d863a3cf Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapserver.soapserver" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapServer::SoapServer</refname>
|
||||
<refpurpose>Конструктор SoapServer</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <methodname>SoapServer::SoapServer</methodname>
|
||||
<methodparam><type>mixed</type><parameter>wsdl</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Данный конструктор позволяет создавать объекты <classname>SoapServer</classname>
|
||||
в WSDL или не-WSDL режимах.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>wsdl</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Для использования SoapServer в режиме WSDL, укажите URI WSDL-файла.
|
||||
В противном случае укажите &null; и установите опцию <literal>uri</literal>
|
||||
равной пространству имен сервера.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>options</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Попытка установить версию SOAP по умолчанию (<literal>soap_version</literal>),
|
||||
внутреннюю кодировку (<literal>encoding</literal>)
|
||||
и URI актора (<literal>actor</literal>).
|
||||
</para>
|
||||
<para>
|
||||
Опцию <literal>classmap</literal> можно использовать для сопоставления
|
||||
некоторых типов WSDL классам PHP. Данная опция должна быть массивом с
|
||||
ключами равными типам WSDL и значениям равными именам классов PHP.
|
||||
</para>
|
||||
<para>
|
||||
Опция <literal>typemap</literal> является массивом сопоставления типов.
|
||||
Массив с ключами <literal>type_name</literal>,
|
||||
<literal>type_ns</literal> (URI пространства имен), <literal>from_xml</literal>
|
||||
(callback-функция, принимающая один строковый параметр) и <literal>to_xml</literal>
|
||||
(callback-функция, принимающая один объект в качестве параметр).
|
||||
</para>
|
||||
<para>
|
||||
Опция <literal>cache_wsdl</literal> задается одной из констант:
|
||||
<constant>WSDL_CACHE_NONE</constant>,
|
||||
<constant>WSDL_CACHE_DISK</constant>,
|
||||
<constant>WSDL_CACHE_MEMORY</constant> или
|
||||
<constant>WSDL_CACHE_BOTH</constant>.
|
||||
</para>
|
||||
<para>
|
||||
Также есть опция <literal>features</literal>, которая задается одной из констант:
|
||||
<constant>SOAP_WAIT_ONE_WAY_CALLS</constant>,
|
||||
<constant>SOAP_SINGLE_ELEMENT_ARRAYS</constant> или
|
||||
<constant>SOAP_USE_XSI_ARRAY_TYPE</constant>.
|
||||
</para>
|
||||
<para>
|
||||
опция <literal>send_errors</literal> устанавливается в &false; для отсылки
|
||||
общего сообщения об ошибке ("Internal error") вместо конкретезированного
|
||||
сообщения об ошибке.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Пример использования <function>SoapServer::SoapServer</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$server = new SoapServer("some.wsdl");
|
||||
|
||||
$server = new SoapServer("some.wsdl", array('soap_version' => SOAP_1_2));
|
||||
|
||||
$server = new SoapServer("some.wsdl", array('actor' => "http://example.org/ts-tests/C"));
|
||||
|
||||
$server = new SoapServer("some.wsdl", array('encoding'=>'ISO-8859-1'));
|
||||
|
||||
$server = new SoapServer(null, array('uri' => "http://test-uri/"));
|
||||
|
||||
class MyBook {
|
||||
public $title;
|
||||
public $author;
|
||||
}
|
||||
|
||||
$server = new SoapServer("books.wsdl", array('classmap' => array('book' => "MyBook")));
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>5.2.0</entry>
|
||||
<entry>
|
||||
Добавлена опция <literal>typemap</literal>.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>SoapClient::SoapClient</methodname></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:"~/.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
|
||||
-->
|
49
reference/soap/soapvar/construct.xml
Normal file
49
reference/soap/soapvar/construct.xml
Normal file
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: c78fd91f2d5c8cb1508a595970b1761ff78cb6fd Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapvar.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapVar::__construct</refname>
|
||||
<refpurpose>Конструктор SoapVar</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<methodname>SoapVar::__construct</methodname>
|
||||
<methodparam><type>mixed</type><parameter>data</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>encoding</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>type_name</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>type_namespace</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>node_name</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>node_namespace</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
&info.function.alias; <methodname>SoapVar::SoapVar</methodname>
|
||||
</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
|
||||
-->
|
143
reference/soap/soapvar/soapvar.xml
Normal file
143
reference/soap/soapvar/soapvar.xml
Normal file
@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: c00fa073b3d4e6204a43fae5d480e19ee60ba9e0 Maintainer: rjhdby Status: ready -->
|
||||
<!-- Reviewed: no -->
|
||||
|
||||
<refentry xml:id="soapvar.soapvar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SoapVar::SoapVar</refname>
|
||||
<refpurpose>Конструктор SoapVar</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<methodname>SoapVar::SoapVar</methodname>
|
||||
<methodparam><type>mixed</type><parameter>data</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>encoding</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>type_name</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>type_namespace</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>node_name</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>node_namespace</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Создает новый объект <classname>SoapVar</classname>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Данные для передачи или возвращения.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>encoding</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Идентификатор кодировки, одна из констант <literal>XSD_...</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type_name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Имя типа.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type_namespace</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Пространство имен.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>node_name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Имя XML-ноды.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>node_namespace</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Пространство имен XML-ноды.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Пример использования <function>SoapVar::SoapVar</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
class SOAPStruct {
|
||||
function SOAPStruct($s, $i, $f)
|
||||
{
|
||||
$this->varString = $s;
|
||||
$this->varInt = $i;
|
||||
$this->varFloat = $f;
|
||||
}
|
||||
}
|
||||
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
|
||||
'uri' => "http://test-uri/"));
|
||||
$struct = new SOAPStruct('arg', 34, 325.325);
|
||||
$soapstruct = new SoapVar($struct, SOAP_ENC_OBJECT, "SOAPStruct", "http://soapinterop.org/xsd");
|
||||
$client->echoStruct(new SoapParam($soapstruct, "inputStruct"));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>SoapClient::__soapCall</methodname></member>
|
||||
<member><methodname>SoapParam::SoapParam</methodname></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:"~/.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
|
||||
-->
|
Reference in New Issue
Block a user