cvs: phpdoc /en/reference/soap/functions SoapClient-__call.xml SoapClient-__getFunctions.xml SoapClient-__getLastRequest.xml
SoapClient-__getLastResponse.xml SoapClient-__getTypes.xml SoapFault-SoapFault.xml SoapHeader-SoapHeader.xml SoapParam-SoapParam.xml
SoapServer-getFunctions.xml SoapServer-handle.xml SoapServer-setClass.xml SoapServer-setPersistence.xml SoapVar-SoapVar.xml
| From: | Mehdi Achour | Date: | Fri, 27 Feb 2004 12:34:17 +0000 |
| Subject: | cvs: phpdoc /en/reference/soap/functions SoapClient-__call.xml SoapClient-__getFunctions.xml SoapClient-__getLastRequest.xml SoapClient-__getLastResponse.xml SoapClient-__getTypes.xml SoapFault-SoapFault.xml SoapHeader-SoapHeader.xml SoapParam-SoapParam.xml SoapServer-getFunctions.xml SoapServer-handle.xml SoapServer-setClass.xml SoapServer-setPersistence.xml SoapVar-SoapVar.xml |
||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969359267@lists.php.net to get a copy of this message | ||
didou Fri Feb 27 07:34:17 2004 EDT
Added files:
/phpdoc/en/reference/soap/functions SoapClient-__call.xml
SoapClient-__getFunctions.xml
SoapClient-__getLastRequest.xml
SoapClient-__getLastResponse.xml
SoapClient-__getTypes.xml
SoapFault-SoapFault.xml
SoapHeader-SoapHeader.xml
SoapParam-SoapParam.xml
SoapServer-getFunctions.xml
SoapServer-handle.xml
SoapServer-setClass.xml
SoapServer-setPersistence.xml
SoapVar-SoapVar.xml
Log:
More SOAP docs, thanks to Dmitry for his excellent work
# still need some typo hunting
http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapClient-__call.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapClient-__call.xml +++ phpdoc/en/reference/soap/functions/SoapClient-__call.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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 simple call SOAP functions as SoapClient methods. It is useful for nonWSDL mode when <literal>soapaction</literal> is unknown, <literal>uri</literal> is differ form default or when you like to send and/or receive SOAP Headers. On error call to SOAP function can cause PHP exceptions or return SoapFault object, if exceptions was disabled. To check if function call was failed catch the SoapFault exceptions or check the result with <function>is_soap_fault</function> function. </para> <para> SOAP function 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 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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapClient-__getFunctions.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapClient-__getFunctions.xml +++ phpdoc/en/reference/soap/functions/SoapClient-__getFunctions.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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> <methodparam><type>void</type><parameter></parameter></methodparam> </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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapClient-__getLastRequest.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapClient-__getLastRequest.xml +++ phpdoc/en/reference/soap/functions/SoapClient-__getLastRequest.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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> <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> <para> This function works only with SoapClient which was created with <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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapClient-__getLastResponse.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapClient-__getLastResponse.xml +++ phpdoc/en/reference/soap/functions/SoapClient-__getLastResponse.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <refentry id="function.SoapClient-__getLastResponse"> <refnamediv> <refname>SoapClient::__getLastResponse</refname> <refpurpose> Returns last SOAP response </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>object</type><methodname>SoapClient::__getLastResponse</methodname> <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> <para> This function works only with SoapClient which was created with <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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapClient-__getTypes.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapClient-__getTypes.xml +++ phpdoc/en/reference/soap/functions/SoapClient-__getTypes.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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> <methodparam><type>void</type><parameter></parameter></methodparam> </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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapFault-SoapFault.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapFault-SoapFault.xml +++ phpdoc/en/reference/soap/functions/SoapFault-SoapFault.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <refentry id="function.SoapFault-SoapFault"> <refnamediv> <refname>SoapFault::SoapFault</refname> <refpurpose> SoapFault constructor </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>object</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 like to send SOAP fault response from 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 error in 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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapHeader-SoapHeader.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapHeader-SoapHeader.xml +++ phpdoc/en/reference/soap/functions/SoapHeader-SoapHeader.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <refentry id="function.SoapHeader-SoapHeader"> <refnamediv> <refname>SoapHeader::SoapHeader</refname> <refpurpose> SoapHeader constructor </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>object</type><methodname>SoapHeader::SoapHeader</methodname> <methodparam><type>string</type><parameter>namespace</parameter></methodparam> <methodparam><type>string</type><parameter>name</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>data</parameter></methodparam> <methodparam choice="opt"><type>bool</type><parameter>mustUnderstand</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>actor</parameter></methodparam> </methodsynopsis> <para> SoapHeader is a special low-level class for passing or returning SOAP headers. It is just a data holder and it has not any special method except constructor. It can be used in <function>SoapClient::__call</function> method to pass SOAP header or in SOAP header handler to return header in 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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapParam-SoapParam.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapParam-SoapParam.xml +++ phpdoc/en/reference/soap/functions/SoapParam-SoapParam.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <refentry id="function.SoapParam-SoapParam"> <refnamediv> <refname>SoapParam::SoapParam</refname> <refpurpose> SoapParam constructor </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>object</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 return values in nonWSDL mode. It is just a data holder and it has not any special method except constructor. The constructor takes <parameter>data</parameter> to pass or return and <parameter>name</parameter>. It is possible to pass parameters directly as PHP value, but in this case it will be named as <literal>paramN</literal> and 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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapServer-getFunctions.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapServer-getFunctions.xml +++ phpdoc/en/reference/soap/functions/SoapServer-getFunctions.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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> <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> <para> This functions returns the list of all functions which was added by <function>SoapServer::addFunction</function> or <function>SoapServer::setCalss</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 . " "; } } ?> ]]> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapServer-handle.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapServer-handle.xml +++ phpdoc/en/reference/soap/functions/SoapServer-handle.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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> It processes a SOAP request, call necessary functions, and send response back. It assumes request in input parameter <parameter>soap_request</parameter> or in 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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapServer-setClass.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapServer-setClass.xml +++ phpdoc/en/reference/soap/functions/SoapServer-setClass.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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 default class constructor during object creation. The object can be maiden persistent across request for a given PHP session with <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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapServer-setPersistence.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapServer-setPersistence.xml +++ phpdoc/en/reference/soap/functions/SoapServer-setPersistence.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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 PHP session. It works only with server that exports functions form 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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapVar-SoapVar.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapVar-SoapVar.xml +++ phpdoc/en/reference/soap/functions/SoapVar-SoapVar.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <refentry id="function.SoapVar-SoapVar"> <refnamediv> <refname>SoapVar::SoapVar</refname> <refpurpose> SoapVar constructor </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>object</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 return values in nonWSDL mode. It is just a data holder and it has not any special method except constructor. It is useful when you like to set 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> </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 -->
http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapClient-__call.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapClient-__call.xml +++ phpdoc/en/reference/soap/functions/SoapClient-__call.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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 simple call SOAP functions as SoapClient methods. It is useful for nonWSDL mode when <literal>soapaction</literal> is unknown, <literal>uri</literal> is differ form default or when you like to send and/or receive SOAP Headers. On error call to SOAP function can cause PHP exceptions or return SoapFault object, if exceptions was disabled. To check if function call was failed catch the SoapFault exceptions or check the result with <function>is_soap_fault</function> function. </para> <para> SOAP function 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 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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapClient-__getFunctions.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapClient-__getFunctions.xml +++ phpdoc/en/reference/soap/functions/SoapClient-__getFunctions.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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> <methodparam><type>void</type><parameter></parameter></methodparam> </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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapClient-__getLastRequest.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapClient-__getLastRequest.xml +++ phpdoc/en/reference/soap/functions/SoapClient-__getLastRequest.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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> <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> <para> This function works only with SoapClient which was created with <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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapClient-__getLastResponse.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapClient-__getLastResponse.xml +++ phpdoc/en/reference/soap/functions/SoapClient-__getLastResponse.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <refentry id="function.SoapClient-__getLastResponse"> <refnamediv> <refname>SoapClient::__getLastResponse</refname> <refpurpose> Returns last SOAP response </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>object</type><methodname>SoapClient::__getLastResponse</methodname> <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> <para> This function works only with SoapClient which was created with <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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapClient-__getTypes.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapClient-__getTypes.xml +++ phpdoc/en/reference/soap/functions/SoapClient-__getTypes.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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> <methodparam><type>void</type><parameter></parameter></methodparam> </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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapFault-SoapFault.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapFault-SoapFault.xml +++ phpdoc/en/reference/soap/functions/SoapFault-SoapFault.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <refentry id="function.SoapFault-SoapFault"> <refnamediv> <refname>SoapFault::SoapFault</refname> <refpurpose> SoapFault constructor </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>object</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 like to send SOAP fault response from 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 error in 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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapHeader-SoapHeader.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapHeader-SoapHeader.xml +++ phpdoc/en/reference/soap/functions/SoapHeader-SoapHeader.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <refentry id="function.SoapHeader-SoapHeader"> <refnamediv> <refname>SoapHeader::SoapHeader</refname> <refpurpose> SoapHeader constructor </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>object</type><methodname>SoapHeader::SoapHeader</methodname> <methodparam><type>string</type><parameter>namespace</parameter></methodparam> <methodparam><type>string</type><parameter>name</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>data</parameter></methodparam> <methodparam choice="opt"><type>bool</type><parameter>mustUnderstand</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>actor</parameter></methodparam> </methodsynopsis> <para> SoapHeader is a special low-level class for passing or returning SOAP headers. It is just a data holder and it has not any special method except constructor. It can be used in <function>SoapClient::__call</function> method to pass SOAP header or in SOAP header handler to return header in 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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapParam-SoapParam.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapParam-SoapParam.xml +++ phpdoc/en/reference/soap/functions/SoapParam-SoapParam.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <refentry id="function.SoapParam-SoapParam"> <refnamediv> <refname>SoapParam::SoapParam</refname> <refpurpose> SoapParam constructor </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>object</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 return values in nonWSDL mode. It is just a data holder and it has not any special method except constructor. The constructor takes <parameter>data</parameter> to pass or return and <parameter>name</parameter>. It is possible to pass parameters directly as PHP value, but in this case it will be named as <literal>paramN</literal> and 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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapServer-getFunctions.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapServer-getFunctions.xml +++ phpdoc/en/reference/soap/functions/SoapServer-getFunctions.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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> <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> <para> This functions returns the list of all functions which was added by <function>SoapServer::addFunction</function> or <function>SoapServer::setCalss</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 . " "; } } ?> ]]> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapServer-handle.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapServer-handle.xml +++ phpdoc/en/reference/soap/functions/SoapServer-handle.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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> It processes a SOAP request, call necessary functions, and send response back. It assumes request in input parameter <parameter>soap_request</parameter> or in 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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapServer-setClass.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapServer-setClass.xml +++ phpdoc/en/reference/soap/functions/SoapServer-setClass.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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 default class constructor during object creation. The object can be maiden persistent across request for a given PHP session with <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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapServer-setPersistence.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapServer-setPersistence.xml +++ phpdoc/en/reference/soap/functions/SoapServer-setPersistence.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <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 PHP session. It works only with server that exports functions form 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> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/SoapVar-SoapVar.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/SoapVar-SoapVar.xml +++ phpdoc/en/reference/soap/functions/SoapVar-SoapVar.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <refentry id="function.SoapVar-SoapVar"> <refnamediv> <refname>SoapVar::SoapVar</refname> <refpurpose> SoapVar constructor </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>object</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 return values in nonWSDL mode. It is just a data holder and it has not any special method except constructor. It is useful when you like to set 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> </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 -->