mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-28 14:58:55 +00:00

Contructors were still documented as aliases to classname::classname with the real documentation in classname::classname. Closes GH-332.
174 lines
6 KiB
XML
174 lines
6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="soapclient.soapcall" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>SoapClient::__soapCall</refname>
|
|
<refpurpose>Calls a SOAP function</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>mixed</type><methodname>SoapClient::__soapCall</methodname>
|
|
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
|
<methodparam><type>array</type><parameter>args</parameter></methodparam>
|
|
<methodparam choice="opt"><type class="union"><type>array</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
|
|
<methodparam choice="opt"><type class="union"><type>SoapHeader</type><type>array</type><type>null</type></type><parameter>inputHeaders</parameter><initializer>&null;</initializer></methodparam>
|
|
<methodparam choice="opt"><type>array</type><parameter role="reference">outputHeaders</parameter><initializer>&null;</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
This is a low level API function that is used to make a SOAP call. Usually,
|
|
in WSDL mode, SOAP functions can be called as methods of the
|
|
<classname>SoapClient</classname> object. This method is 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="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>name</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The name of the SOAP function to call.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>args</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
An array of the arguments to pass to the function. This can be either
|
|
an ordered or an associative array. Note that most SOAP servers require
|
|
parameter names to be provided, in which case this must be an
|
|
associative array.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>options</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
An associative array of options to pass to the client.
|
|
</para>
|
|
<para>
|
|
The <literal>location</literal> option is the URL of the remote Web service.
|
|
</para>
|
|
<para>
|
|
The <literal>uri</literal> option is the target namespace of the SOAP service.
|
|
</para>
|
|
<para>
|
|
The <literal>soapaction</literal> option is the action to call.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>inputHeaders</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
An array of headers to be sent along with the SOAP request.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>outputHeaders</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
If supplied, this array will be filled with the headers from the SOAP response.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</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>
|
|
<para>
|
|
On error, if the SoapClient object was constructed with the <literal>exceptions</literal>
|
|
option set to &false;, a SoapFault object will be returned.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>SoapClient::__soapCall</function> example</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><methodname>SoapClient::__construct</methodname></member>
|
|
<member><methodname>SoapParam::__construct</methodname></member>
|
|
<member><methodname>SoapVar::__construct</methodname></member>
|
|
<member><methodname>SoapHeader::__construct</methodname></member>
|
|
<member><methodname>SoapFault::__construct</methodname></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:"~/.phpdoc/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
|
|
-->
|