php-doc-en/reference/soap/functions/SoapClient-__call.xml
2004-02-27 13:59:44 +00:00

82 lines
3 KiB
XML

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