Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

soapclient.__soapcall(3) [php man page]

SOAPCLIENT.__SOAPCALL(3)						 1						  SOAPCLIENT.__SOAPCALL(3)

SoapClient::__soapCall - Calls a SOAP function

SYNOPSIS
public mixed SoapClient::__soapCall (string $function_name, array $arguments, [array $options], [mixed $input_headers], [array &$out- put_headers]) DESCRIPTION
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(3). PARAMETERS
o $function_name - The name of the SOAP function to call. o $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. o $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. o $input_headers - An array of headers to be sent along with the SOAP request. o $output_headers - 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 exceptions option set to FALSE, a SoapFault object will be returned. EXAMPLES
Example #1 SoapClient.__soapCall(3) 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')); ?> SEE ALSO
SoapClient::SoapClient, SoapParam::SoapParam, SoapVar::SoapVar, SoapHeader::SoapHeader, SoapFault::SoapFault, is_soap_fault(3). PHP Documentation Group SOAPCLIENT.__SOAPCALL(3)

Check Out this Related Man Page

SOAPCLIENT.SOAPCLIENT(3)						 1						  SOAPCLIENT.SOAPCLIENT(3)

SoapClient::SoapClient - SoapClient constructor

SYNOPSIS
public SoapClient::SoapClient (mixed $wsdl, [array $options]) DESCRIPTION
This constructor creates SoapClient objects in WSDL or non-WSDL mode. PARAMETERS
o $wsdl - URI of the WSDL file or NULL if working in non-WSDL mode. Note During development, WSDL caching may be disabled by the use of the soap.wsdl_cache_ttl php.ini setting otherwise changes made to the WSDL file will have no effect until soap.wsdl_cache_ttl is expired. o $options - An array of options. If working in WSDL mode, this parameter is optional. If working in non-WSDL mode, the location and uri options must be set, where location is the URL of the SOAP server to send the request to, and uri is the target namespace of the SOAP service. The style and use options only work in non-WSDL mode. In WSDL mode, they come from the WSDL file. The soap_version option should be one of either SOAP_1_1 or SOAP_1_2 to select SOAP 1.1 or 1.2, respectively. If omitted, 1.1 is used. For HTTP authentication, the login and password options can be used to supply credentials. For making an HTTP connection through a proxy server, the options proxy_host, proxy_port, proxy_login and proxy_password are also available. For HTTPS client certificate authentication use local_cert and passphrase options. An authentication may be supplied in the authentication option. The authen- tication method may be either SOAP_AUTHENTICATION_BASIC (default) or SOAP_AUTHENTICATION_DIGEST. The compression option allows to use compression of HTTP SOAP requests and responses. The encoding option defines internal character encoding. This option does not change the encoding of SOAP requests (it is always utf-8), but converts strings into it. The trace option enables tracing of request so faults can be backtraced. This defaults to FALSE The classmap option can be used to map some WSDL types to PHP classes. This option must be an array with WSDL types as keys and names of PHP classes as values. Setting the boolean trace option enables use of the methods SoapClient->__getLastRequest, SoapClient->__getLastRequestHeaders, SoapClient->__getLastResponse and Soap- Client->__getLastResponseHeaders. The exceptions option is a boolean value defining whether soap errors throw exceptions of type SoapFault. The connection_timeout option defines a timeout in seconds for the connection to the SOAP service. This option does not define a timeout for services with slow responses. To limit the time to wait for calls to finish the default_socket_timeout setting is available. The typemap option is an array of type mappings. Type mapping is an array with keys type_name, type_ns (namespace URI), from_xml (callback accepting one string parameter) and to_xml (callback accepting one object parameter). The cache_wsdl option is one of WSDL_CACHE_NONE, WSDL_CACHE_DISK, WSDL_CACHE_MEMORY or WSDL_CACHE_BOTH. The user_agent option speci- fies string to use in User-Agent header. The stream_context option is a resource for context. The features option is a bitmask of SOAP_SINGLE_ELEMENT_ARRAYS, SOAP_USE_XSI_ARRAY_TYPE, SOAP_WAIT_ONE_WAY_CALLS. The keep_alive option is a boolean value defin- ing whether to send the Connection: Keep-Alive header or Connection: close. The ssl_method option is one of SOAP_SSL_METHOD_TLS, SOAP_SSL_METHOD_SSLv2, SOAP_SSL_METHOD_SSLv3 or SOAP_SSL_METHOD_SSLv23. ERRORS
/EXCEPTIONS SoapClient::SoapClient will generate an E_ERROR error if the location and uri options aren't provided in non-WSDL mode. A SoapFault exception will be thrown if the $wsdl URI cannot be loaded. CHANGELOG
+--------+-------------------------+ |Version | | | | | | | Description | | | | +--------+-------------------------+ | 5.5.0 | | | | | | | New ssl_method option. | | | | | 5.4.0 | | | | | | | New keep_alive option. | | | | +--------+-------------------------+ EXAMPLES
Example #1 SoapClient.SoapClient(3) example <?php $client = new SoapClient("some.wsdl"); $client = new SoapClient("some.wsdl", array('soap_version' => SOAP_1_2)); $client = new SoapClient("some.wsdl", array('login' => "some_name", 'password' => "some_password")); $client = new SoapClient("some.wsdl", array('proxy_host' => "localhost", 'proxy_port' => 8080)); $client = new SoapClient("some.wsdl", array('proxy_host' => "localhost", 'proxy_port' => 8080, 'proxy_login' => "some_name", 'proxy_password' => "some_password")); $client = new SoapClient("some.wsdl", array('local_cert' => "cert_key.pem")); $client = new SoapClient(null, array('location' => "http://localhost/soap.php", 'uri' => "http://test-uri/")); $client = new SoapClient(null, array('location' => "http://localhost/soap.php", 'uri' => "http://test-uri/", 'style' => SOAP_DOCUMENT, 'use' => SOAP_LITERAL)); $client = new SoapClient("some.wsdl", array('compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP)); $server = new SoapClient("some.wsdl", array('encoding'=>'ISO-8859-1')); class MyBook { public $title; public $author; } $server = new SoapClient("books.wsdl", array('classmap' => array('book' => "MyBook"))); ?> PHP Documentation Group SOAPCLIENT.SOAPCLIENT(3)
Man Page