mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-04-26 01:58:13 +02:00
5f2061eb94
Remove PHP4 constructors from ext/soap documentation
182 lines
6.4 KiB
XML
182 lines
6.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: e64ea89bbe0bd2cc28d48adfb3723f9ed5720fd1 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<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>Appelle une fonction SOAP</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>
|
|
Ceci est une fonction bas niveau de l'API qui est utilisée pour faire des appels
|
|
SOAP. Habituellement, en mode WSDL, vous pouvez appeler simplement les
|
|
fonctions SOAP comme des méthodes <classname>SoapClient</classname>.
|
|
Cette méthode est pratique en mode non-WSDL lorsque
|
|
<literal>soapaction</literal> est inconnu, <literal>uri</literal> est différente
|
|
de la valeur par défaut ou lors de l'envoi et/ou de la réception d'en-têtes SOAP.
|
|
</para>
|
|
<para>
|
|
En cas d'erreur, un appel à une fonction SOAP peut causer un lancement
|
|
d'exception par PHP ou retourner un objet <classname>SoapFault</classname>
|
|
si les exceptions sont désactivées. Pour vérifier si l'appel à cette fonction n'arrive
|
|
pas à attraper les exceptions <classname>SoapFault</classname>,
|
|
vérifiez le résultat avec la fonction <function>is_soap_fault</function>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>name</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le nom de la fonction SOAP à appeler.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>args</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Un tableau d'arguments à passer à la fonction. Cela peut être
|
|
un tableau associatif ou ordonné. Notez que la plupart des serveurs
|
|
SOAP nécessite des noms de paramètres, auquel cas, ce doit être un
|
|
tableau associatif.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>options</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Un tableau associatif d'options à passer au client.
|
|
</para>
|
|
<para>
|
|
Une option de <literal>location</literal> pour le service Web distant.
|
|
</para>
|
|
<para>
|
|
Une option <literal>uri</literal> avec l'espace de noms cible du service SOAP.
|
|
</para>
|
|
<para>
|
|
L'option <literal>soapaction</literal> est l'action à appeler.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>inputHeaders</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Un tableau d'entêtes à envoyer avec la requête SOAP.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>outputHeaders</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Si fourni, ce tableau sera rempli avec les entêtes de
|
|
la réponse SOAP retournée.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Les fonctions SOAP retournent une ou plusieurs valeurs. Si une seule valeur est
|
|
retournée par la fonction SOAP, la valeur retournée de
|
|
<literal>__soapCall</literal> sera une valeur simple (e.g. un entier, une chaîne
|
|
de caractères, etc.). Si plusieurs valeurs sont retournées,
|
|
<literal>__soapCall</literal> retournera un tableau associatif contenant les
|
|
noms des paramètres affichés.
|
|
</para>
|
|
<para>
|
|
En cas d'erreur, si l'objet <classname>SoapClient</classname> a été construit
|
|
avec l'option <literal>exceptions</literal> qui valait &false;, un objet
|
|
<classname>SoapFault</classname> sera retourné.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>SoapClient::__soapCall</function></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
|
|
-->
|