cvs: phpdoc /en/reference/soap reference.xml /en/reference/soap/functions SoapClient-SoapClient.xml 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-SoapServer.xml SoapServer-addFunction.xml SoapServer-getFunctions.xml SoapServer-handle.xml SoapServer-setClass.xml
SoapServer-setPersistence.xml SoapVar-SoapVar.xml is-soap-fault.xml soap-soapclient-call.xml soap-soapclient-construct.xml
soap-soapclient-getfunctions.xml soap-soapclient-getlastrequest.xml soap-soapclient-getlastresponse.xml soap-soapclient-gettypes.xml
soap-soapfault-construct.xml soap-soapheader-construct.xml soap-soapparam-construct.xml soap-soapserver-addfunction.xml soap-soapserver-construct.xml
soap-soapserver-getfunctions.xml soap-soapserver-handle.xml soap-soapserver-setclass.xml soap-soapserver-setpersistence.xml soap-soapvar-construct.xml
| From: | Mehdi Achour | Date: | Mon, 10 Jan 2005 00:46:18 +0000 |
| Subject: | cvs: phpdoc /en/reference/soap reference.xml /en/reference/soap/functions SoapClient-SoapClient.xml 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-SoapServer.xml SoapServer-addFunction.xml SoapServer-getFunctions.xml SoapServer-handle.xml SoapServer-setClass.xml SoapServer-setPersistence.xml SoapVar-SoapVar.xml is-soap-fault.xml soap-soapclient-call.xml soap-soapclient-construct.xml soap-soapclient-getfunctions.xml soap-soapclient-getlastrequest.xml soap-soapclient-getlastresponse.xml soap-soapclient-gettypes.xml soap-soapfault-construct.xml soap-soapheader-construct.xml soap-soapparam-construct.xml soap-soapserver-addfunction.xml soap-soapserver-construct.xml soap-soapserver-getfunctions.xml soap-soapserver-handle.xml soap-soapserver-setclass.xml soap-soapserver-setpersistence.xml soap-soapvar-construct.xml |
||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969365888@lists.php.net to get a copy of this message | ||
didou Sun Jan 9 19:46:18 2005 EDT
Added files:
/phpdoc/en/reference/soap/functions soap-soapclient-call.xml
soap-soapclient-construct.xml
soap-soapclient-getfunctions.xml
soap-soapclient-getlastrequest.xml
soap-soapclient-getlastresponse.xml
soap-soapclient-gettypes.xml
soap-soapfault-construct.xml
soap-soapheader-construct.xml
soap-soapparam-construct.xml
soap-soapserver-addfunction.xml
soap-soapserver-construct.xml
soap-soapserver-getfunctions.xml
soap-soapserver-handle.xml
soap-soapserver-setclass.xml
soap-soapserver-setpersistence.xml
soap-soapvar-construct.xml
Removed files:
/phpdoc/en/reference/soap/functions SoapClient-SoapClient.xml
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-SoapServer.xml
SoapServer-addFunction.xml
SoapServer-getFunctions.xml
SoapServer-handle.xml
SoapServer-setClass.xml
SoapServer-setPersistence.xml
SoapVar-SoapVar.xml
Modified files:
/phpdoc/en/reference/soap reference.xml
/phpdoc/en/reference/soap/functions is-soap-fault.xml
Log:
Switch ref.soap to the new structure
# Changed filenames and ids to follow the other OO references
# This also fix #30464
http://cvs.php.net/diff.php/phpdoc/en/reference/soap/reference.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/soap/reference.xml diff -u phpdoc/en/reference/soap/reference.xml:1.2 phpdoc/en/reference/soap/reference.xml:1.3 --- phpdoc/en/reference/soap/reference.xml:1.2 Fri Feb 27 07:26:41 2004 +++ phpdoc/en/reference/soap/reference.xml Sun Jan 9 19:46:17 2005 @@ -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> + + <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"> + &reftitle.install; + <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> + + <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> - 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. + <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.requirements"> - &reftitle.required; + + <section id='soap.class.soapparam'> + <title><classname>SoapParam</classname></title> <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. + <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.installation"> - &reftitle.install; + <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> - This extension is only available if PHP was configured with - <option role="configure">--enable-soap</option>. + <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> - &reference.soap.ini; + </section> + &reference.soap.constants; </partintro> http://cvs.php.net/diff.php/phpdoc/en/reference/soap/functions/is-soap-fault.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/soap/functions/is-soap-fault.xml diff -u phpdoc/en/reference/soap/functions/is-soap-fault.xml:1.7 phpdoc/en/reference/soap/functions/is-soap-fault.xml:1.8 --- phpdoc/en/reference/soap/functions/is-soap-fault.xml:1.7 Mon Nov 8 07:10:21 2004 +++ phpdoc/en/reference/soap/functions/is-soap-fault.xml Sun Jan 9 19:46:17 2005 @@ -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 @@ } ?> ]]> - </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 @@ } ?> ]]> - </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: http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapclient-call.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapclient-call.xml +++ phpdoc/en/reference/soap/functions/soap-soapclient-call.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapclient-construct.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapclient-construct.xml +++ phpdoc/en/reference/soap/functions/soap-soapclient-construct.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapclient-getfunctions.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapclient-getfunctions.xml +++ phpdoc/en/reference/soap/functions/soap-soapclient-getfunctions.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapclient-getlastrequest.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapclient-getlastrequest.xml +++ phpdoc/en/reference/soap/functions/soap-soapclient-getlastrequest.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapclient-getlastresponse.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapclient-getlastresponse.xml +++ phpdoc/en/reference/soap/functions/soap-soapclient-getlastresponse.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapclient-gettypes.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapclient-gettypes.xml +++ phpdoc/en/reference/soap/functions/soap-soapclient-gettypes.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapfault-construct.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapfault-construct.xml +++ phpdoc/en/reference/soap/functions/soap-soapfault-construct.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapheader-construct.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapheader-construct.xml +++ phpdoc/en/reference/soap/functions/soap-soapheader-construct.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapparam-construct.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapparam-construct.xml +++ phpdoc/en/reference/soap/functions/soap-soapparam-construct.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapserver-addfunction.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapserver-addfunction.xml +++ phpdoc/en/reference/soap/functions/soap-soapserver-addfunction.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapserver-construct.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapserver-construct.xml +++ phpdoc/en/reference/soap/functions/soap-soapserver-construct.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapserver-getfunctions.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapserver-getfunctions.xml +++ phpdoc/en/reference/soap/functions/soap-soapserver-getfunctions.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapserver-handle.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapserver-handle.xml +++ phpdoc/en/reference/soap/functions/soap-soapserver-handle.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapserver-setclass.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapserver-setclass.xml +++ phpdoc/en/reference/soap/functions/soap-soapserver-setclass.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapserver-setpersistence.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapserver-setpersistence.xml +++ phpdoc/en/reference/soap/functions/soap-soapserver-setpersistence.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapvar-construct.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapvar-construct.xml +++ phpdoc/en/reference/soap/functions/soap-soapvar-construct.xml <?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 -->
http://cvs.php.net/diff.php/phpdoc/en/reference/soap/reference.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/soap/reference.xml diff -u phpdoc/en/reference/soap/reference.xml:1.2 phpdoc/en/reference/soap/reference.xml:1.3 --- phpdoc/en/reference/soap/reference.xml:1.2 Fri Feb 27 07:26:41 2004 +++ phpdoc/en/reference/soap/reference.xml Sun Jan 9 19:46:17 2005 @@ -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> + + <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"> + &reftitle.install; + <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> + + <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> - 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. + <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.requirements"> - &reftitle.required; + + <section id='soap.class.soapparam'> + <title><classname>SoapParam</classname></title> <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. + <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.installation"> - &reftitle.install; + <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> - This extension is only available if PHP was configured with - <option role="configure">--enable-soap</option>. + <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> - &reference.soap.ini; + </section> + &reference.soap.constants; </partintro> http://cvs.php.net/diff.php/phpdoc/en/reference/soap/functions/is-soap-fault.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/soap/functions/is-soap-fault.xml diff -u phpdoc/en/reference/soap/functions/is-soap-fault.xml:1.7 phpdoc/en/reference/soap/functions/is-soap-fault.xml:1.8 --- phpdoc/en/reference/soap/functions/is-soap-fault.xml:1.7 Mon Nov 8 07:10:21 2004 +++ phpdoc/en/reference/soap/functions/is-soap-fault.xml Sun Jan 9 19:46:17 2005 @@ -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 @@ } ?> ]]> - </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 @@ } ?> ]]> - </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: http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapclient-call.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapclient-call.xml +++ phpdoc/en/reference/soap/functions/soap-soapclient-call.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapclient-construct.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapclient-construct.xml +++ phpdoc/en/reference/soap/functions/soap-soapclient-construct.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapclient-getfunctions.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapclient-getfunctions.xml +++ phpdoc/en/reference/soap/functions/soap-soapclient-getfunctions.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapclient-getlastrequest.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapclient-getlastrequest.xml +++ phpdoc/en/reference/soap/functions/soap-soapclient-getlastrequest.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapclient-getlastresponse.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapclient-getlastresponse.xml +++ phpdoc/en/reference/soap/functions/soap-soapclient-getlastresponse.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapclient-gettypes.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapclient-gettypes.xml +++ phpdoc/en/reference/soap/functions/soap-soapclient-gettypes.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapfault-construct.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapfault-construct.xml +++ phpdoc/en/reference/soap/functions/soap-soapfault-construct.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapheader-construct.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapheader-construct.xml +++ phpdoc/en/reference/soap/functions/soap-soapheader-construct.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapparam-construct.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapparam-construct.xml +++ phpdoc/en/reference/soap/functions/soap-soapparam-construct.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapserver-addfunction.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapserver-addfunction.xml +++ phpdoc/en/reference/soap/functions/soap-soapserver-addfunction.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapserver-construct.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapserver-construct.xml +++ phpdoc/en/reference/soap/functions/soap-soapserver-construct.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapserver-getfunctions.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapserver-getfunctions.xml +++ phpdoc/en/reference/soap/functions/soap-soapserver-getfunctions.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapserver-handle.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapserver-handle.xml +++ phpdoc/en/reference/soap/functions/soap-soapserver-handle.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapserver-setclass.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapserver-setclass.xml +++ phpdoc/en/reference/soap/functions/soap-soapserver-setclass.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapserver-setpersistence.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapserver-setpersistence.xml +++ phpdoc/en/reference/soap/functions/soap-soapserver-setpersistence.xml <?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 --> http://cvs.php.net/co.php/phpdoc/en/reference/soap/functions/soap-soapvar-construct.xml?r=1.1&p=1 Index: phpdoc/en/reference/soap/functions/soap-soapvar-construct.xml +++ phpdoc/en/reference/soap/functions/soap-soapvar-construct.xml <?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 -->