php-doc-en/reference/soap/functions/soap-soapclient-soapcall.xml
Hannes Magnusson c030e2adf7 Upgrade to DocBook5:
- All id attributes are now xml:id
 - Add docbook namespace to all root elements
 - Replace <ulink /> with <link xlink:href />
 - Minor markup fixes here and there


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238160 c90b9560-bf6c-de11-be94-00142212c4b1
2007-06-20 22:25:43 +00:00

112 lines
4 KiB
XML

<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<refentry xml:id="function.soap-soapclient-soapcall" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SoapClient->__soapCall()</refname>
<refpurpose>
Calls a SOAP function
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapClient</classname></ooclass>
<methodsynopsis>
<type>mixed</type><methodname>__soapCall</methodname>
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
<methodparam><type>array</type><parameter>arguments</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>input_headers</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">output_headers</parameter></methodparam>
</methodsynopsis>
</classsynopsis>
<para>
This is a low level API function that is used to make a SOAP call. Usually,
in WSDL mode,
you can simply call SOAP functions as <classname>SoapClient</classname>
methods. This method useful in non-WSDL mode when <literal>soapaction</literal>
is unknown, <literal>uri</literal> differs from the default or when sending
and/or receiving SOAP Headers.
</para>
<para>
On error, a call to a SOAP function can cause PHP to throw exceptions or return a
<classname>SoapFault</classname> object if exceptions are disabled.
To check if the function call failed to catch the SoapFault exceptions,
check the result with <function>is_soap_fault</function>.
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
SOAP functions may return one, or multiple values. If only one value is returned
by the SOAP function, the return value of <literal>__soapCall</literal> will be
a simple value (e.g. an integer, a string, etc). If multiple values are
returned, <literal>__soapCall</literal> will return
an associative array of named output parameters.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>SoapClient->__soapCall() Examples</title>
<programlisting role="php">
<![CDATA[
<?php
$client = new SoapClient("some.wsdl");
$client->SomeFunction($a, $b, $c);
$client->__soapCall("SomeFunction", array($a, $b, $c));
$client->__soapCall("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->__soapCall("SomeFunction", array($a, $b, $c));
$client->__soapCall("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
-->