Download the PHP package alpari/soap-client without Composer
On this page you can find all versions of the php package alpari/soap-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alpari/soap-client
More information about alpari/soap-client
Files in alpari/soap-client
Package soap-client
Short Description Soap client with additional features
License MIT
Informations about the package soap-client
Soap client
Extended PHP soap client with additional features.
Features
- Timeout support for requests
- Asynchronous SOAP requests
- Custom HTTP-request headers
- Logging support with PSR-3-compatible logger
- Special test client for writing tests on your server
Prerequisites
The soap
, dom
, curl
, libxml
extensions must be pre-installed on the server in order to use this library.
Installing
The recommended way is using a composer
Usage
Simple SOAP request
Async SOAP requests
This feature execute multiple SOAP requests in parallel.
The responses variable will contain the result of all calls made inside async
function in order
they were called there. In example above the responses[0] is the return value of
remote method methodA
, response[1] is the return value of methodB
.
If there was an exception during some method call, the corresponding array item will contain an exception object
of SoapFault
class.
Requests with timeout
To set timeout for request use setTimeout
value with a single parameter - time to wait request completion
in milliseconds. If setTimeout
method is not called explicitly, the value of php-ini setting
default_socket_timeout
will be used.
Passing custom HTTP headers
Logging requests
The SoapClient
implements Psr\Log\LoggerAwareInterface
.
SOAP client constructor options
This implementation of SOAP client supports additional array of options:
local_cert
- client certificate file name to use for SSL connection.local_key
- private for client certificate, if it is stored as a separate file.passphrase
- password for certificate private key.ca_bundle
- file name with trusted CAs for verifying server certificate. If not provided, the system one is used.curl
- array with additional curl options. See all possible options here.cache_prefix
- file name prefix for generated wsdl cache file names
Testing own SOAP servers
To test your own SOAP server you need to install additional packages if you steel don't have them in a project:
If the project is based on Symfony framework, just use Alpari\Components\SoapClient\Test\TestSoapClient
in
the test-case
If the project is based on some other framework you will need an implementation of Symfony\Component\HttpKernel\HttpKernelInterface
in your test which will redirect all calls to application's entry point and return
symfony Response
object:
Running the tests
Tests are written with phpunit. To run the tests use the following command:
License
This project is licensed under the MIT License - see the LICENSE file for details
All versions of soap-client with dependencies
ext-curl Version *
ext-dom Version *
ext-libxml Version *
ext-soap Version *
psr/log Version ^1.1