drewlabs / soap-client
SOAP HTTP Client implementation
Installs: 34
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/drewlabs/soap-client
Requires
- drewlabs/async: ^0.1.4
- psr/http-client: ^1.0
- psr/http-factory: ^1.0|^2.0
- psr/http-message: ^1.0|^2.0
Requires (Dev)
- phpunit/phpunit: >=7.0
This package is auto-updated.
Last update: 2025-09-28 13:46:08 UTC
README
The library provides an SOAP HTTP client implementation
Usage
use Drewlabs\Soap\Http\SoapHttpClientFactory; // ... // Defines soap options $options = [ // ... ]; // Create request client $factory = new SoapHttpClientFactory(); $client = $factory->create( new Client(), new StreamFactory, // Provide your own PSR7 StreamFactory or use nyholm/psr7 package new Psr7RequestFactory, // Provide your own PSR7 RequestFactory or use nyholm/psr7 package '<WSDL_URL>', $options, null // \Drewlabs\Soap\Contracts\RequestInterface::class (Class name of the class to use in parsing request parameters). // You can use it to transform request body ); // Making synchronous call $result = $client->send($method, [ //... SOAP parameters ]); // Making async call $promise = $client->sendAsync($method, [ //... SOAP parameters ]); $result = $promise->wait();