Switch ref.soap to the new structure

# Changed filenames and ids to follow the other OO references
# This also fix #30464


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@176801 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2005-01-10 00:46:17 +00:00
parent 93cada7420
commit 5528dd40df
34 changed files with 1942 additions and 1261 deletions

View file

@ -1,98 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.3 $ -->
<refentry id="function.SoapClient-SoapClient">
<refnamediv>
<refname>SoapClient::SoapClient</refname>
<refpurpose>
SoapClient constructor
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>SoapClient</type><methodname>SoapClient::SoapClient</methodname>
<methodparam><type>mixed</type><parameter>wsdl</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
</methodsynopsis>
<para>
This constructor allows creating SoapClient objects in WSDL or non-WSDL mode.
The first case requires the URI of WSDL file as the first parameter and an
optional <parameter>options</parameter> array. The second case requires &null;
as the first parameter and the <parameter>options</parameter> array with
<literal>location</literal> and <literal>uri</literal> options set,
where <literal>location</literal> is a URL to request and <literal>uri</literal>
is a target namespace of the SOAP service.
</para>
<para>
The <literal>style</literal> and <literal>use</literal> options only work in
non-WSDL mode. In WSDL mode, they comes from the WSDL file.
</para>
<para>
The <literal>soap_version</literal> option specifies whether to use SOAP
1.1, or SOAP 1.2 client.
</para>
<para>
For HTTP authentication, you may use the <literal>login</literal> and
<literal>password</literal> options. For making a HTTP connection through
a proxy server, use the options <literal>proxy_host</literal>,
<literal>proxy_port</literal>, <literal>proxy_login</literal>
and <literal>proxy_password</literal>.
</para>
<para>
<example>
<title>SoapClient examples</title>
<programlisting role="php">
<![CDATA[
<?php
$client = new SoapClient("some.wsdl");
$client = new SoapClient("some.wsdl", array('soap_version' => SOAP_1_2));
$client = new SoapClient("some.wsdl", array('login' => "some_name",
'password' => "some_password"));
$client = new SoapClient("some.wsdl", array('proxy_host' => "localhost",
'proxy_port' => 8080));
$client = new SoapClient("some.wsdl", array('proxy_host' => "localhost",
'proxy_port' => 8080,
'proxy_login' => "some_name",
'proxy_password' => "some_password"));
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/"));
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/",
'style' => SOAP_DOCUMENT,
'use' => SOAP_LITERAL));
?>
]]>
</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:"../../../../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
-->

View file

@ -1,91 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.2 $ -->
<refentry id="function.SoapClient-call">
<refnamediv>
<refname>SoapClient::__call</refname>
<refpurpose>
Calls a SOAP function
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>SoapClient::__call</methodname>
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>arguments</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>input_headers</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>output_headers</parameter></methodparam>
</methodsynopsis>
<para>
This is a low level API function to make a SOAP call. Usually in WSDL mode
you can simply call SOAP functions as SoapClient methods. It is useful for
non-WSDL mode when <literal>soapaction</literal> is unknown, <literal>uri</literal>
differs from the default or when you like to send and/or receive SOAP Headers.
On error, a call to a SOAP function can cause PHP exceptions or return a
SoapFault object if exceptions was disabled.
To check if the function call failed catch the SoapFault exceptions or
check the result with the <function>is_soap_fault</function> function.
</para>
<para>
SOAP functions may return one or several values. In the first case it will
return just the value of output parameter, in the second it will return
the associative array with named output parameters.
</para>
<para>
<example>
<title><function>SoapClient::__call</function> examples</title>
<programlisting role="php">
<![CDATA[
<?php
$client = new SoapClient("some.wsdl");
$client->SomeFunction($a, $b, $c);
$client->__call("SomeFunction", array($a, $b, $c));
$client->__call("SomeFunction", array($a, $b, $c), NULL,
new SoapHeader(), $output_headers);
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/"));
$client->SomeFunction($a, $b, $c);
$client->__call("SomeFunction", array($a, $b, $c));
$client->__call("SomeFunction", array($a, $b, $c),
array('soapaction' => 'some_action',
'uri' => 'some_uri'));
?>
]]>
</programlisting>
</example>
</para>
<para>
See also
<function>SoapClient::SoapClient</function>,
<function>SoapParam::SoapParam</function>,
<function>SoapVar::SoapVar</function>,
<function>SoapHeader::SoapHeader</function>,
<function>SoapFault::SoapFault</function>, and
<function>is_soap_fault</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
-->

View file

@ -1,58 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.2 $ -->
<refentry id="function.SoapClient-getFunctions">
<refnamediv>
<refname>SoapClient::__getFunctions</refname>
<refpurpose>
Returns list of SOAP functions
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>SoapClient::__getFunctions</methodname>
<void/>
</methodsynopsis>
<para>
This function works only in WSDL mode.
</para>
<para>
<example>
<title><function>SoapClient::__getFunctions</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$client = SoapClient("some.wsdl");
var_dump($client->__getFunctions());
?>
]]>
</programlisting>
</example>
</para>
<para>
See also
<function>SoapClient::SoapClient</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
-->

View file

@ -1,60 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.3 $ -->
<refentry id="function.SoapClient-getLastRequest">
<refnamediv>
<refname>SoapClient::__getLastRequest</refname>
<refpurpose>
Returns last SOAP request
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>SoapClient::__getLastRequest</methodname>
<void/>
</methodsynopsis>
<para>
This function works only with SoapClient which was created with
the <literal>trace</literal> option.
</para>
<para>
<example>
<title><function>SoapClient::__getLastRequest</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$client = SoapClient("some.wsdl", array('trace' => 1));
$result = $client->SomeFunction();
echo "REQUEST:\n" . $client->__getLastRequest() . "\n";
?>
]]>
</programlisting>
</example>
</para>
<para>
See also
<function>SoapClient::SoapClient</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
-->

View file

@ -1,60 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.SoapClient-getLastResponse">
<refnamediv>
<refname>SoapClient::__getLastResponse</refname>
<refpurpose>
Returns last SOAP response
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>SoapClient::__getLastResponse</methodname>
<void/>
</methodsynopsis>
<para>
This function works only with SoapClient which was created with
the <literal>trace</literal> option.
</para>
<para>
<example>
<title><function>SoapClient::__getLastResponse</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$client = SoapClient("some.wsdl", array('trace' => 1));
$result = $client->SomeFunction();
echo "RESPONSE:\n" . $client->__getLastResponse() . "\n";
?>
]]>
</programlisting>
</example>
</para>
<para>
See also
<function>SoapClient::SoapClient</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
-->

View file

@ -1,58 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.2 $ -->
<refentry id="function.SoapClient-getTypes">
<refnamediv>
<refname>SoapClient::__getTypes</refname>
<refpurpose>
Returns list of SOAP types
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>SoapClient::__getTypes</methodname>
<void/>
</methodsynopsis>
<para>
This function works only in WSDL mode.
</para>
<para>
<example>
<title><function>SoapClient::__getTypes</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$client = SoapClient("some.wsdl");
var_dump($client->__getTypes());
?>
]]>
</programlisting>
</example>
</para>
<para>
See also
<function>SoapClient::SoapClient</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
-->

View file

@ -1,102 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.6 $ -->
<refentry id="function.SoapFault-SoapFault">
<refnamediv>
<refname>SoapFault::SoapFault</refname>
<refpurpose>
SoapFault constructor
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>SoapFault</type><methodname>SoapFault::SoapFault</methodname>
<methodparam><type>string</type><parameter>faultcode</parameter></methodparam>
<methodparam><type>string</type><parameter>faultstring</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>faultactor</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>detail</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>faultname</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>headerfault</parameter></methodparam>
</methodsynopsis>
<para>
This class is useful when you would like to send SOAP fault responses from
the PHP handler. <parameter>faultcode</parameter>, <parameter>faultstring</parameter>,
<parameter>faultactor</parameter> and <parameter>details</parameter> are
standard elements of SOAP Fault; <parameter>faultname</parameter> is an
optional parameter that can be used to select proper fault encoding from
WSDL; <parameter>headerfault</parameter> is an optional parameter that
can be used during SOAP header handling to report an error in the response
header.
</para>
<para>
<example>
<title>Some examples</title>
<programlisting role="php">
<![CDATA[
<?php
function test($x)
{
return new SoapFault("Server", "Some error message");
}
$server = new SoapServer(null, array('uri' => "http://test-uri/"));
$server->addFunction("test");
$server->handle();
?>
]]>
</programlisting>
</example>
</para>
<para>
It is possible to use PHP exception mechanism to throw SOAP Fault.
</para>
<para>
<example>
<title>Some examples</title>
<programlisting role="php">
<![CDATA[
<?php
function test($x)
{
throw new SoapFault("Server", "Some error message");
}
$server = new SoapServer(null, array('uri' => "http://test-uri/"));
$server->addFunction("test");
$server->handle();
?>
]]>
</programlisting>
</example>
</para>
<para>
See also
<function>SoapClient::SoapClient</function>,
<function>SoapClient::__call</function>,
<function>SoapParam::SoapParam</function>,
<function>SoapVar::SoapVar</function>, and
<function>is_soap_fault</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
-->

View file

@ -1,77 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.SoapHeader-SoapHeader">
<refnamediv>
<refname>SoapHeader::SoapHeader</refname>
<refpurpose>
SoapHeader constructor
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>SoapHeader</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
-->

View file

@ -1,69 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.7 $ -->
<refentry id="function.SoapParam-SoapParam">
<refnamediv>
<refname>SoapParam::SoapParam</refname>
<refpurpose>
SoapParam constructor
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>SoapParam</type><methodname>SoapParam::SoapParam</methodname>
<methodparam><type>mixed</type><parameter>data</parameter></methodparam>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
SoapParam is a special low-level class for naming parameters and returning
values in non-WSDL mode. It is just a data holder and it does not have any
special methods except the constructor. The constructor takes
<parameter>data</parameter> to pass or return and <parameter>name</parameter>.
It is possible to pass parameters directly as PHP values, but in this case
it will be named as <literal>paramN</literal> and the SOAP Service may not
understand them.
</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->SomeFunction(new SoapParam($a, "a"),
new SoapParam($b, "b"),
new SoapParam($c, "c"));
?>
]]>
</programlisting>
</example>
</para>
<para>
See also
<function>SoapClient::__call</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
-->

View file

@ -1,67 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.SoapServer-SoapServer">
<refnamediv>
<refname>SoapServer::SoapServer</refname>
<refpurpose>
SoapServer constructor
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>SoapServer</type><methodname>SoapServer::SoapServer</methodname>
<methodparam><type>mixed</type><parameter>wsdl</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
</methodsynopsis>
<para>
This constructor allows the creation of SoapServer objects in WSDL or non-WSDL mode.
In the first case, <parameter>wsdl</parameter> must be set to the URI of a WSDL file.
In the second case, <parameter>wsdl</parameter> must be set to &null; and the
<literal>uri</literal> option must be set.
Additional <parameter>options</parameter> allow setting a default SOAP version
(<literal>soap_version</literal>) and actor URI (<literal>actor</literal>).
</para>
<para>
<example>
<title>Some examples</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(null, array('uri' => "http://test-uri/"));
?>
]]>
</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:"../../../../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
-->

View file

@ -1,86 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.SoapServer-addFunction">
<refnamediv>
<refname>SoapServer::addFunction</refname>
<refpurpose>
Adds one or several functions those will handle SOAP requests
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>SoapServer::addFunction</methodname>
<methodparam><type>mixed</type><parameter>functions</parameter></methodparam>
</methodsynopsis>
<para>
Exports one or more functions for remote clients.
</para>
<para>
To export one function, pass the function name into the
<parameter>functions</parameter> parameter as a string.
To export several functions pass an array of function names, and to export all
functions pass a special constant <constant>SOAP_FUNCTIONS_ALL</constant>.
</para>
<para>
<parameter>functions</parameter> must receive all input arguments in the same
order as defined in the WSDL file (They should not receive any output parameters
as arguments) and return one or more values. To return several values they must
return an array with named output parameters.
</para>
<para>
<example>
<title>Some examples</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>
<para>
See also
<function>SoapServer::SoapServer</function>, and
<function>SoapServer::SetClass</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
-->

View file

@ -1,71 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.SoapServer-getFunctions">
<refnamediv>
<refname>SoapServer::getFunctions</refname>
<refpurpose>
Returns list of defined functions
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>SoapServer::getFunctions</methodname>
<void/>
</methodsynopsis>
<para>
This functions returns the list of all functions which was added by
<function>SoapServer::addFunction</function> or
<function>SoapServer::setClass</function>.
</para>
<para>
<example>
<title>Some examples</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>
<para>
See also
<function>SoapServer::SoapServer</function>,
<function>SoapServer::addFunction</function>, and
<function>SoapServer::SetClass</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
-->

View file

@ -1,67 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.SoapServer-handle">
<refnamediv>
<refname>SoapServer::handle</refname>
<refpurpose>
Handles a SOAP request
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>SoapServer::handle</methodname>
<methodparam choice="opt"><type>string</type><parameter>soap_request</parameter></methodparam>
</methodsynopsis>
<para>
Processes a SOAP request, calls necessary functions, and sends a response
back. It assumes a request in input parameter <parameter>soap_request</parameter>
or in the global <varname>$HTTP_RAW_POST_DATA</varname> PHP variable if the argument is
omitted.
</para>
<para>
<example>
<title>Some examples</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>
<para>
See also
<function>SoapServer::SoapServer</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
-->

View file

@ -1,77 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.3 $ -->
<refentry id="function.SoapServer-setClass">
<refnamediv>
<refname>SoapServer::setClass</refname>
<refpurpose>
Sets class which will handle SOAP requests
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>SoapServer::setClass</methodname>
<methodparam><type>string</type><parameter>class_name</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>args</parameter></methodparam>
</methodsynopsis>
<para>
Exports all methods from specified class. Additional parameters <parameter>args</parameter>
will be passed to the default class constructor during object creation.
The object can be made persistent across request for a given PHP session
with the <function>SoapServer::setPersistence</function> method.
</para>
<para>
<example>
<title>Some examples</title>
<programlisting role="php">
<![CDATA[
<?php
class foo {
function foo()
{
}
}
$server->setClass("foo");
class bar {
function bar($x, $y)
{
}
}
$server->setClass("bar", $arg1, $arg2);
?>
]]>
</programlisting>
</example>
</para>
<para>
See also
<function>SoapServer::SoapServer</function>,
<function>SoapServer::addFunction</function>, and
<function>SoapServer::setPersistence</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
-->

View file

@ -1,64 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.3 $ -->
<refentry id="function.SoapServer-setPersistence">
<refnamediv>
<refname>SoapServer::setPersistence</refname>
<refpurpose>
Sets persistence mode of SoapServer
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>SoapServer::setPersistence</methodname>
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
<para>
This function allows saving data between requests in a PHP session. It works only
with a server that exports functions from a class with
<function>SoapServer::setClass</function>.
</para>
<para>
<example>
<title>Some examples</title>
<programlisting role="php">
<![CDATA[
<?php
$server->setPersistence(SOAP_PERSISTENCE_SESSION);
$server->setPersistence(SOAP_PERSISTENCE_REQUEST);
?>
]]>
</programlisting>
</example>
</para>
<para>
See also
<function>SoapServer::SoapServer</function>, and
<function>SoapServer::SetClass</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
-->

View file

@ -1,81 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.SoapVar-SoapVar">
<refnamediv>
<refname>SoapVar::SoapVar</refname>
<refpurpose>
SoapVar constructor
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>SoapVar</type><methodname>SoapVar::SoapVar</methodname>
<methodparam><type>mixed</type><parameter>data</parameter></methodparam>
<methodparam><type>int</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>
SoapVar is a special low-level class for encoding parameters and returning
values in non-WSDL mode. It is just a data holder and does not have any
special methods except the constructor. It is useful when you would like to set
the type property in SOAP request or response. The constructor takes
<parameter>data</parameter> to pass or return, <parameter>encoding</parameter>
ID to encode it (see <literal>XSD_...</literal> constants) and as option type
name and namespace and XML node name and namespace.
</para>
<para>
<example>
<title>Some examples</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>
<para>
See also
<function>SoapClient::__call</function> and
<function>SoapParam::SoapParam</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
-->

View file

@ -1,37 +1,61 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.7 $ -->
<refentry id="function.is-soap-fault">
<refnamediv>
<refname>is_soap_fault</refname>
<refpurpose>
Checks if SOAP call was failed
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>is_soap_fault</methodname>
<methodparam><type>mixed</type><parameter>obj</parameter></methodparam>
</methodsynopsis>
<para>
This function is useful when you like to check if the
SOAP call failed, but don't like to use exceptions.
To use it you must create a SoapClient object with
<literal>exceptions</literal> option set to zero or &false;.
In this case, the SOAP method will return a special SoapFault
object which encapsulates the fault details (faultcode,
faultstring, faultactor and faultdetails).
</para>
<para>
If <literal>exceptions</literal> is not set then SOAP call will throw
an exception on error.
<function>is_soap_fault</function> checks if the given
parameter is a SoapFault object.
</para>
<para>
<example>
<title><function>is_soap_fault</function> example</title>
<programlisting role="php">
<!-- $Revision: 1.8 $ -->
<refentry id="function.is-soap-fault">
<refnamediv>
<refname>is_soap_fault</refname>
<refpurpose>
Checks if SOAP call was failed
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>is_soap_fault</methodname>
<methodparam><type>mixed</type><parameter>obj</parameter></methodparam>
</methodsynopsis>
<para>
This function is useful when you like to check if the SOAP call failed, but
don't like to use exceptions. To use it you must create a
<classname>SoapClient</classname> object with the <literal>exceptions</literal>
option set to zero or &false;.
In this case, the SOAP method will return a special
<classname>SoapFault</classname> object which encapsulates the fault
details (faultcode, faultstring, faultactor and faultdetails).
</para>
<para>
If <literal>exceptions</literal> is not set then SOAP call will throw
an exception on error.
<function>is_soap_fault</function> checks if the given
parameter is a <classname>SoapFault</classname> object.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>obj</parameter></term>
<listitem>
<para>
The tested object.
</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>is_soap_fault</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$client = new SoapClient("some.wsdl", array('exceptions' => 0));
@ -41,11 +65,11 @@ if (is_soap_fault($result)) {
}
?>
]]>
</programlisting>
</example>
<example>
<title>SOAP's standard method for error reporting is exceptions</title>
<programlisting role="php">
</programlisting>
</example>
<example>
<title>SOAP's standard method for error reporting is exceptions</title>
<programlisting role="php">
<![CDATA[
<?php
try {
@ -56,16 +80,20 @@ try {
}
?>
]]>
</programlisting>
</example>
</para>
<para>
See also
<function>SoapClient::SoapClient</function>, and
<function>SoapFault::SoapFault</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.soap-soapclient-construct" /></member>
<member><xref linkend="function.soap-soapfault-construct" /></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -0,0 +1,110 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapclient-call">
<refnamediv>
<refname>SoapClient->__call()</refname>
<refpurpose>
Calls a SOAP function
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapClient</classname></ooclass>
<methodsynopsis>
<type>mixed</type>
<methodname>__call</methodname>
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>arguments</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>input_headers</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>output_headers</parameter></methodparam>
</methodsynopsis>
</classsynopsis>
<para>
This is a low level API function to make a SOAP call. Usually in WSDL mode
you can simply call SOAP functions as <classname>SoapClient</classname>
methods. It is useful for non-WSDL mode when <literal>soapaction</literal>
is unknown, <literal>uri</literal> differs from the default or when you like
to send and/or receive SOAP Headers.
</para>
<para>
On error, a call to a SOAP function can cause PHP exceptions or return a
<classname>SoapFault</classname> object if exceptions was disabled.
To check if the function call failed catch the SoapFault exceptions or
check the result with <function>is_soap_fault</function>.
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
SOAP functions may return one or several values. In the first case it will
return just the value of output parameter, in the second it will return
the associative array with named output parameters.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>SoapClient->__call() Examples</title>
<programlisting role="php">
<![CDATA[
<?php
$client = new SoapClient("some.wsdl");
$client->SomeFunction($a, $b, $c);
$client->__call("SomeFunction", array($a, $b, $c));
$client->__call("SomeFunction", array($a, $b, $c), NULL,
new SoapHeader(), $output_headers);
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/"));
$client->SomeFunction($a, $b, $c);
$client->__call("SomeFunction", array($a, $b, $c));
$client->__call("SomeFunction", array($a, $b, $c),
array('soapaction' => 'some_action',
'uri' => 'some_uri'));
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.soap-soapclient-construct" /></member>
<member><xref linkend="function.soap-soapparam-construct" /></member>
<member><xref linkend="function.soap-soapvar-construct" /></member>
<member><xref linkend="function.soap-soapheader-construct" /></member>
<member><xref linkend="function.soap-soapfault-construct" /></member>
<member><function>is_soap_fault</function></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
-->

View file

@ -0,0 +1,127 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapclient-construct">
<refnamediv>
<refname>SoapClient->__construct()</refname>
<refpurpose>
SoapClient constructor
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapClient</classname></ooclass>
<constructorsynopsis>
<methodname>__construct</methodname>
<methodparam><type>mixed</type><parameter>wsdl</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
</constructorsynopsis>
</classsynopsis>
<para>
This constructor allows creating <classname>SoapClient</classname> objects
in <literal>WSDL</literal> or <literal>non-WSDL</literal> mode.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>wsdl</parameter></term>
<listitem>
<para>
URI of the <literal>WSDL</literal> file or &null; if working in
<literal>non-WSDL</literal> mode.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>options</parameter></term>
<listitem>
<para>
An array of option. If working in WSDL mode, this parameter is optional.
If working in non-WSDL mode, you must set the <literal>location</literal>
and <literal>uri</literal> options, where <literal>location</literal> is
a URL to request and <literal>uri</literal> is a target namespace of the
SOAP service.
</para>
<para>
The <literal>style</literal> and <literal>use</literal> options only work in
non-WSDL mode. In WSDL mode, they comes from the WSDL file.
</para>
<para>
The <literal>soap_version</literal> option specifies whether to use SOAP
1.1, or SOAP 1.2 client.
</para>
<para>
For HTTP authentication, you may use the <literal>login</literal> and
<literal>password</literal> options. For making a HTTP connection through
a proxy server, use the options <literal>proxy_host</literal>,
<literal>proxy_port</literal>, <literal>proxy_login</literal>
and <literal>proxy_password</literal>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>SoapClient examples</title>
<programlisting role="php">
<![CDATA[
<?php
$client = new SoapClient("some.wsdl");
$client = new SoapClient("some.wsdl", array('soap_version' => SOAP_1_2));
$client = new SoapClient("some.wsdl", array('login' => "some_name",
'password' => "some_password"));
$client = new SoapClient("some.wsdl", array('proxy_host' => "localhost",
'proxy_port' => 8080));
$client = new SoapClient("some.wsdl", array('proxy_host' => "localhost",
'proxy_port' => 8080,
'proxy_login' => "some_name",
'proxy_password' => "some_password"));
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/"));
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/",
'style' => SOAP_DOCUMENT,
'use' => SOAP_LITERAL));
?>
]]>
</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:"../../../../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
-->

View file

@ -0,0 +1,80 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapclient-getfunctions">
<refnamediv>
<refname>SoapClient->__getFunctions()</refname>
<refpurpose>
Returns list of SOAP functions
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapClient</classname></ooclass>
<methodsynopsis>
<type>array</type>
<methodname>__getFunctions</methodname>
<void />
</methodsynopsis>
</classsynopsis>
<para>
Returns the list of SOAP functions.
</para>
<note>
<para>
This function works only in WSDL mode.
</para>
</note>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The list of SOAP functions.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>SoapClient->__getFunctions() example</title>
<programlisting role="php">
<![CDATA[
<?php
$client = SoapClient("some.wsdl");
var_dump($client->__getFunctions());
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.soap-soapclient-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
-->

View file

@ -0,0 +1,80 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapclient-getlastrequest">
<refnamediv>
<refname>SoapClient->__getLastRequest()</refname>
<refpurpose>
Returns last SOAP request
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapClient</classname></ooclass>
<methodsynopsis>
<type>string</type>
<methodname>__getLastRequest</methodname>
<void />
</methodsynopsis>
</classsynopsis>
<note>
<para>
This method works only if the <classname>SoapClient</classname> object
was created with the <literal>trace</literal> option.
</para>
</note>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The last SOAP request.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>SoapClient->__getLastRequest() example</title>
<programlisting role="php">
<![CDATA[
<?php
$client = SoapClient("some.wsdl", array('trace' => 1));
$result = $client->SomeFunction();
echo "REQUEST:\n" . $client->__getLastRequest() . "\n";
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.soap-soapclient-construct" /></member>
<member><xref linkend="function.soap-soapclient-getlastresponse" /></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
-->

View file

@ -0,0 +1,80 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapclient-getlastresponse">
<refnamediv>
<refname>SoapClient->__getLastResponse()</refname>
<refpurpose>
Returns last SOAP response.
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapClient</classname></ooclass>
<methodsynopsis>
<type>string</type>
<methodname>__getLastResponse</methodname>
<void />
</methodsynopsis>
</classsynopsis>
<note>
<para>
This method works only if the <classname>SoapClient</classname> object
was created with the <literal>trace</literal> option.
</para>
</note>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The last SOAP response.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>SoapClient->__getLastResponse() example</title>
<programlisting role="php">
<![CDATA[
<?php
$client = SoapClient("some.wsdl", array('trace' => 1));
$result = $client->SomeFunction();
echo "RESPONSE:\n" . $client->__getLastResponse() . "\n";
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.soap-soapclient-construct" /></member>
<member><xref linkend="function.soap-soapclient-getlastrequest" /></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
-->

View file

@ -0,0 +1,75 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapclient-gettypes">
<refnamediv>
<refname>SoapClient->__getTypes()</refname>
<refpurpose>
Returns list of SOAP types
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapClient</classname></ooclass>
<methodsynopsis>
<type>array</type>
<methodname>__getTypes</methodname>
<void />
</methodsynopsis>
</classsynopsis>
<para>
This function works only in WSDL mode.
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The list of SOAP types.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>SoapClient->__getTypes() example</title>
<programlisting role="php">
<![CDATA[
<?php
$client = new SoapClient("some.wsdl");
var_dump($client->__getTypes());
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.soap-soapclient-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
-->

View file

@ -0,0 +1,164 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapfault-construct">
<refnamediv>
<refname>SoapFault->__construct()</refname>
<refpurpose>
SoapFault constructor
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapFault</classname></ooclass>
<constructorsynopsis>
<methodname>__construct</methodname>
<methodparam><type>string</type><parameter>faultcode</parameter></methodparam>
<methodparam><type>string</type><parameter>faultstring</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>faultactor</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>detail</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>faultname</parameter></methodparam>
<methodparam choice="opt"><type>SoapHeader</type><parameter>headerfault</parameter></methodparam>
</constructorsynopsis>
</classsynopsis>
<para>
This class is useful when you would like to send SOAP fault responses from
the PHP handler. <parameter>faultcode</parameter>, <parameter>faultstring</parameter>,
<parameter>faultactor</parameter> and <parameter>details</parameter> are
standard elements of SOAP Fault;
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>faultcode</parameter></term>
<listitem>
<para>
The error code of the <classname>SoapFault</classname>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>faultstring</parameter></term>
<listitem>
<para>
The error message of the <classname>SoapFault</classname>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>faultactor</parameter></term>
<listitem>
<para>
A string identifying the actor that caused the error.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>detail</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>faultname</parameter></term>
<listitem>
<para>
Can be used to select the proper fault encoding from WSDL.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>headerfault</parameter></term>
<listitem>
<para>
Can be used during SOAP header handling to report an error in the
response header.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Some examples</title>
<programlisting role="php">
<![CDATA[
<?php
function test($x)
{
return new SoapFault("Server", "Some error message");
}
$server = new SoapServer(null, array('uri' => "http://test-uri/"));
$server->addFunction("test");
$server->handle();
?>
]]>
</programlisting>
</example>
</para>
<para>
It is possible to use PHP exception mechanism to throw SOAP Fault.
</para>
<para>
<example>
<title>Some examples</title>
<programlisting role="php">
<![CDATA[
<?php
function test($x)
{
throw new SoapFault("Server", "Some error message");
}
$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><xref linkend="function.soap-soapclient-construct" /></member>
<member><xref linkend="function.soap-soapclient-call" /></member>
<member><xref linkend="function.soap-soapvar-construct" /></member>
<member><xref linkend="function.soap-soapparam-construct" /></member>
<member><xref linkend="function.soap-soapfault-construct" /></member>
<member><function>is_soap_fault</function></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
-->

View file

@ -0,0 +1,128 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapheader-construct">
<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>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>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.soap-soapclient-call" /></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
-->

View file

@ -0,0 +1,98 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapparam-construct">
<refnamediv>
<refname>SoapParam->__construct()</refname>
<refpurpose>
SoapParam constructor
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapParam</classname></ooclass>
<constructorsynopsis>
<methodname>__construct</methodname>
<methodparam><type>mixed</type><parameter>data</parameter></methodparam>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</constructorsynopsis>
</classsynopsis>
<para>
Constructs a new <classname>SoapParam</classname> object.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
The data to pass or return. You can pass this parameter directly as PHP
value, but in this case it will be named as <literal>paramN</literal> and
the SOAP Service may not understand it.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>name</parameter></term>
<listitem>
<para>
The parameter name.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<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->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><xref linkend="function.soap-soapclient-call" /></member>
<member><xref linkend="function.soap-soapvar-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
-->

View file

@ -0,0 +1,121 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapserver-addfunction">
<refnamediv>
<refname>SoapServer->addFunction()</refname>
<refpurpose>
Adds one or several functions those will handle SOAP requests
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapServer</classname></ooclass>
<methodsynopsis>
<void/>
<methodname>addFunction</methodname>
<methodparam><type>mixed</type><parameter>functions</parameter></methodparam>
</methodsynopsis>
</classsynopsis>
<para>
Exports one or more functions for remote clients.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>functions</parameter></term>
<listitem>
<para>
To export one function, pass the function name into this parameter as
a string.
</para>
<para>
To export several functions, pass an array of function names.
</para>
<para>
To export all the functions, pass a special constant <constant>SOAP_FUNCTIONS_ALL</constant>.
</para>
<note>
<para>
<parameter>functions</parameter> must receive all input arguments in the same
order as defined in the WSDL file (They should not receive any output parameters
as arguments) and return one or more values. To return several values they must
return an array with named output parameters.
</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>Some examples</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><xref linkend="function.soap-soapserver-construct" /></member>
<member><xref linkend="function.soap-soapserver-setclass" /></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
-->

View file

@ -0,0 +1,95 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapserver-construct">
<refnamediv>
<refname>SoapServer->__construct()</refname>
<refpurpose>
SoapServer constructor
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapServer</classname></ooclass>
<constructorsynopsis>
<methodname>__construct</methodname>
<methodparam><type>mixed</type><parameter>wsdl</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
</constructorsynopsis>
</classsynopsis>
<para>
This constructor allows the creation of <classname>SoapServer</classname>
objects in WSDL or non-WSDL mode.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>wsdl</parameter></term>
<listitem>
<para>
If you want the WSDL mode, you must set this to the URI of a WSDL file.
In the other case, you must set this to &null; and set the <literal>uri</literal>
option.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>options</parameter></term>
<listitem>
<para>
Allow setting a default SOAP version (<literal>soap_version</literal>)
and actor URI (<literal>actor</literal>).
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Some examples</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(null, array('uri' => "http://test-uri/"));
?>
]]>
</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:"../../../../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
-->

View file

@ -0,0 +1,88 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapserver-getfunctions">
<refnamediv>
<refname>SoapServer->getFunctions()</refname>
<refpurpose>
Returns list of defined functions
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapServer</classname></ooclass>
<methodsynopsis>
<type>array</type>
<methodname>getFunctions</methodname>
<void />
</methodsynopsis>
</classsynopsis>
<para>
This method returns the list of all functions added by
<xref linkend="function.soap-soapserver-addfunction" /> or
<xref linkend="function.soap-soapserver-setclass" />.
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The list of all functions.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Some examples</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><xref linkend="function.soap-soapserver-construct" /></member>
<member><xref linkend="function.soap-soapserver-addfunction" /></member>
<member><xref linkend="function.soap-soapserver-setclass" /></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
-->

View file

@ -0,0 +1,98 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapserver-handle">
<refnamediv>
<refname>SoapServer->handle()</refname>
<refpurpose>
Handles a SOAP request
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapServer</classname></ooclass>
<methodsynopsis>
<void/>
<methodname>handle</methodname>
<methodparam choice="opt"><type>string</type><parameter>soap_request</parameter></methodparam>
</methodsynopsis>
</classsynopsis>
<para>
Processes a SOAP request, calls necessary functions, and sends a response
back.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>soap_request</parameter></term>
<listitem>
<para>
The SOAP request. If this argument is omitted, the request is supposed
to be in the <varname>$HTTP_RAW_POST_DATA</varname> PHP variable.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Some examples</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><xref linkend="function.soap-soapserver-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
-->

View file

@ -0,0 +1,119 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapserver-setclass">
<refnamediv>
<refname>SoapServer->setClass()</refname>
<refpurpose>
Sets class which will handle SOAP requests
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapServer</classname></ooclass>
<methodsynopsis>
<void/>
<methodname>setClass</methodname>
<methodparam><type>string</type><parameter>class_name</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>args</parameter></methodparam>
</methodsynopsis>
</classsynopsis>
<para>
Exports all methods from specified class.
</para>
<para>
The object can be made persistent across request for a given PHP session
with the <xref linkend='function.soap-soapserver-setpersistence' /> method.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>class_name</parameter></term>
<listitem>
<para>
The name of the exported class.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>args</parameter></term>
<listitem>
<para>
This optional parameter will be passed to the default class constructor
during object creation.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Some examples</title>
<programlisting role="php">
<![CDATA[
<?php
class foo {
function foo()
{
}
}
$server->setClass("foo");
class bar {
function bar($x, $y)
{
}
}
$server->setClass("bar", $arg1, $arg2);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.soap-soapserver-construct" /></member>
<member><xref linkend="function.soap-soapserver-addfunction" /></member>
<member><xref linkend="function.soap-soapserver-setpersistence" /></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
-->

View file

@ -0,0 +1,95 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapserver-setpersistence">
<refnamediv>
<refname>SoapServer->setPersistence()</refname>
<refpurpose>
Sets persistence mode of SoapServer
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapServer</classname></ooclass>
<methodsynopsis>
<void/>
<methodname>setPersistence</methodname>
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
</classsynopsis>
<para>
This function allows saving data between requests in a PHP session. It works only
with a server that exports functions from a class with
<xref linkend='function.soap-soapserver-setclass' />.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>mode</parameter></term>
<listitem>
<para>
One of the <literal>SOAP_PERSISTENCE_XXX</literal> constants.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Some examples</title>
<programlisting role="php">
<![CDATA[
<?php
$server->setPersistence(SOAP_PERSISTENCE_SESSION);
$server->setPersistence(SOAP_PERSISTENCE_REQUEST);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.soap-soapserver-construct" /></member>
<member><xref linkend="function.soap-soapserver-setclass" /></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
-->

View file

@ -0,0 +1,140 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapvar-construct">
<refnamediv>
<refname>SoapVar->__construct()</refname>
<refpurpose>
SoapVar constructor
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapVar</classname></ooclass>
<constructorsynopsis>
<methodname>__construct</methodname>
<methodparam><type>mixed</type><parameter>data</parameter></methodparam>
<methodparam><type>int</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>
</constructorsynopsis>
</classsynopsis>
<para>
Constructs a new <classname>SoapVar</classname> object.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
The data to pass or return.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>encoding</parameter></term>
<listitem>
<para>
The encoding ID, one of the <literal>XSD_...</literal> constants.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>type_name</parameter></term>
<listitem>
<para>
The type name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>type_namespace</parameter></term>
<listitem>
<para>
The type namespace.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>node_name</parameter></term>
<listitem>
<para>
The XML node name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>node_namespace</parameter></term>
<listitem>
<para>
The XML node namespace.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Some examples</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><xref linkend="function.soap-soapclient-call" /></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
-->

View file

@ -1,40 +1,181 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<reference id="ref.soap">
<title>SOAP Functions</title>
<titleabbrev>SOAP</titleabbrev>
<reference id="ref.soap">
<title>SOAP Functions</title>
<titleabbrev>SOAP</titleabbrev>
<partintro>
<section id="soap.intro">
<partintro>
<section id="soap.intro">
&reftitle.intro;
&warn.experimental;
<para>
The SOAP extension can be used to write SOAP Servers and Clients. It supports
subsets of <ulink url="&spec.soap1.1;">SOAP 1.1</ulink>, <ulink
url="&spec.soap1.2;">SOAP 1.2</ulink> and <ulink
url="&spec.wsdl;">WSDL 1.1</ulink> specifications.
</para>
</section>
<para>
The SOAP extension can be used to write SOAP Servers and Clients. It supports
subsets of <ulink url="&spec.soap1.1;">SOAP 1.1</ulink>, <ulink
url="&spec.soap1.2;">SOAP 1.2</ulink> and <ulink
url="&spec.wsdl;">WSDL 1.1</ulink> specifications.
</para>
</section>
<section id="soap.requirements">
&reftitle.required;
<para>
This extension makes use of the <ulink url="&url.domxml;">GNOME xml
library</ulink>. Download and install this library. You will need at
least libxml-2.5.4.
</para>
</section>
<section id="soap.requirements">
&reftitle.required;
<para>
This extension makes use of the <ulink url="&url.domxml;">GNOME xml
library</ulink>. Download and install this library. You will need at
least libxml-2.5.4.
</para>
</section>
<section id="soap.installation">
<section id="soap.installation">
&reftitle.install;
<para>
This extension is only available if PHP was configured with
<option role="configure">--enable-soap</option>.
</para>
<para>
This extension is only available if PHP was configured with
<option role="configure">--enable-soap</option>.
</para>
</section>
&reference.soap.ini;
<section id='soap.classes'>
&reftitle.classes;
<section id='soap.class.soapclient'>
<title><classname>SoapClient</classname></title>
<para></para>
<section id='soap.class.soapclient.constructor'>
&reftitle.constructor;
<itemizedlist>
<listitem>
<para><xref linkend='function.soap-soapclient-construct' /> - construct a new SoapClient object</para>
</listitem>
</itemizedlist>
</section>
<section id='soap.class.soapclient.methods'>
&reftitle.methods;
<itemizedlist>
<listitem>
<para><xref linkend='function.soap-soapclient-call' /> - Calls a SOAP function</para>
</listitem>
<listitem>
<para><xref linkend='function.soap-soapclient-getfunctions' /> - Returns list of SOAP functions</para>
</listitem>
<listitem>
<para><xref linkend='function.soap-soapclient-getlastrequest' /> - Returns last SOAP request</para>
</listitem>
<listitem>
<para><xref linkend='function.soap-soapclient-getlastresponse' /> - Returns last SOAP response</para>
</listitem>
<listitem>
<para><xref linkend='function.soap-soapclient-gettypes' /> - Returns list of SOAP types</para>
</listitem>
</itemizedlist>
</section>
</section>
&reference.soap.ini;
<section id='soap.class.soapfault'>
<title><classname>SoapFault</classname></title>
<para></para>
<section id='soap.class.soapfault.constructor'>
&reftitle.constructor;
<itemizedlist>
<listitem>
<para><xref linkend='function.soap-soapfault-construct' /> - construct a new SoapFault object</para>
</listitem>
</itemizedlist>
</section>
</section>
<section id='soap.class.soapheader'>
<title><classname>SoapHeader</classname></title>
<para>
<classname>SoapHeader</classname> 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 <xref
linkend='function.soap-soapclient-call' /> method to pass a SOAP header or
in a SOAP header handler to return the header in a SOAP response.
</para>
<section id='soap.class.soapheader.constructor'>
&reftitle.constructor;
<itemizedlist>
<listitem>
<para><xref linkend='function.soap-soapheader-construct' /> - construct a new SoapHeader object</para>
</listitem>
</itemizedlist>
</section>
</section>
<section id='soap.class.soapparam'>
<title><classname>SoapParam</classname></title>
<para>
<classname>SoapParam</classname> is a special low-level class for naming
parameters and returning values in <literal>non-WSDL</literal> mode.
It's just a data holder and it does not have any special methods except
its constructor.
</para>
<section id='soap.class.soapparam.constructor'>
&reftitle.constructor;
<itemizedlist>
<listitem>
<para><xref linkend='function.soap-soapparam-construct' /> - construct a new SoapParam object</para>
</listitem>
</itemizedlist>
</section>
</section>
<section id='soap.class.soapserver'>
<title><classname>SoapServer</classname></title>
<para></para>
<section id='soap.class.soapserver.constructor'>
&reftitle.constructor;
<itemizedlist>
<listitem>
<para><xref linkend='function.soap-soapserver-construct' /> - construct a new SoapServer object</para>
</listitem>
</itemizedlist>
</section>
<section id='soap.class.soapserver.methods'>
&reftitle.methods;
<itemizedlist>
<listitem>
<para><xref linkend='function.soap-soapserver-addfunction' /> - Adds one or several functions those will handle SOAP requests</para>
</listitem>
<listitem>
<para><xref linkend='function.soap-soapserver-getfunctions' /> - Returns list of defined functions</para>
</listitem>
<listitem>
<para><xref linkend='function.soap-soapserver-handle' /> - Handles a SOAP request</para>
</listitem>
<listitem>
<para><xref linkend='function.soap-soapserver-setclass' /> - Sets class which will handle SOAP requests</para>
</listitem>
<listitem>
<para><xref linkend='function.soap-soapserver-setpersistence' /> - Sets persistence mode of SoapServer</para>
</listitem>
</itemizedlist>
</section>
</section>
<section id='soap.class.soapvar'>
<title><classname>SoapVar</classname></title>
<para>
<classname>SoapVar</classname> is a special low-level class for encoding
parameters and returning values in <literal>non-WSDL</literal> mode. It's
just a data holder and does not have any special methods except the constructor.
It's useful when you want to set the type property in SOAP request or response.
</para>
<section id='soap.class.soapvar.constructor'>
&reftitle.constructor;
<itemizedlist>
<listitem>
<para><xref linkend='function.soap-soapvar-construct' /> - construct a new SoapVar object</para>
</listitem>
</itemizedlist>
</section>
</section>
</section>
&reference.soap.constants;
</partintro>