No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

Rechercher une fonction PHP

SoapClient::__soapCall

(PHP 5, PHP 7)

SoapClient::__soapCallCalls a SOAP function

Description

public SoapClient::__soapCall ( string $function_name , array $arguments [, array $options [, mixed $input_headers [, array &$output_headers ]]] ) : mixed

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 SoapClient object. This method is useful in non-WSDL mode when soapaction is unknown, uri differs from the default or when sending and/or receiving SOAP Headers.

On error, a call to a SOAP function can cause PHP to throw exceptions or return a SoapFault object if exceptions are disabled. To check if the function call failed to catch the SoapFault exceptions, check the result with is_soap_fault().

PHP: SoapClient::__soapCall - Manual Home of Manuel PHP  Contents Haut

Parameters

function_name

The name of the SOAP function to call.

arguments

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.

options

An associative array of options to pass to the client.

The location option is the URL of the remote Web service.

The uri option is the target namespace of the SOAP service.

The soapaction option is the action to call.

input_headers

An array of headers to be sent along with the SOAP request.

output_headers

If supplied, this array will be filled with the headers from the SOAP response.

PHP: SoapClient::__soapCall - Manual Home of Manuel PHP  Contents Haut

Return Values

SOAP functions may return one, or multiple values. If only one value is returned by the SOAP function, the return value of __soapCall will be a simple value (e.g. an integer, a string, etc). If multiple values are returned, __soapCall will return an associative array of named output parameters.

On error, if the SoapClient object was constructed with the exceptions option set to FALSE, a SoapFault object will be returned.

PHP: SoapClient::__soapCall - Manual Home of Manuel PHP  Contents Haut

Examples

Example #1 SoapClient::__soapCall() example

<?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'));
?>

PHP: SoapClient::__soapCall - Manual Home of Manuel PHP  Contents Haut

See Also

Find a PHP function

English translation

You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.

If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.

Thank you in advance.

Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-soapclient.soapcall.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : http://php.net

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut