PYTHON SoapClient::__soapCall

Python replacement for PHP's SoapClient::__soapCall [ edit ]

Do you know a Python replacement for PHP's SoapClient::__soapCall ? Write it!

PHP SoapClient::__soapCall

PHP original manual for SoapClient::__soapCall [ show | ]


(PHP 5 >= 5.0.1)

SoapClient::__soapCallCalls a SOAP function


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

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().



The name of the SOAP function to call.


An array of the arguments to pass to the function. This can be either an ordered or an associative array.


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.


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


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

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 trace option set to FALSE, a SoapFault object will be returned.


Example #1 SoapClient::__soapCall() example


= new SoapClient("some.wsdl");

$client->__soapCall("SomeFunction", array($a$b$c));
$client->__soapCall("SomeFunction", array($a$b$c), NULL,
SoapHeader(), $output_headers);

$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
'uri'      => "http://test-uri/"));
$client->__soapCall("SomeFunction", array($a$b$c));
$client->__soapCall("SomeFunction", array($a$b$c),
'soapaction' => 'some_action',
'uri'        => 'some_uri'));

See Also