besimple/soap
BeSimpleSoap provides tools to build SOAP and WSDL-based web services in PHP, including a Symfony2 bundle plus enhanced SoapClient/SoapServer with SwA, MTOM, and WS-Security support, along with shared utilities and WSDL generation.
BeSimpleSoapClient) and building (via BeSimpleSoapServer and BeSimpleSoapBundle) SOAP/WSDL services, aligning well with legacy enterprise systems or regulated industries requiring SOAP.BeSimpleSoapBundle integrates natively with Symfony, making it ideal for Laravel applications already using Symfony components (e.g., via laravel/symfony-bridge or custom integrations).BeSimpleSoapClient, BeSimpleSoapServer, BeSimpleSoapWsdl) can be leveraged in Laravel via standalone usage or custom facades/services, though additional abstraction may be needed.BeSimpleSoapClient extends PHP’s native SoapClient with MTOM, SwA, and WS-Security, addressing common SOAP pain points (e.g., binary attachments, security).BeSimpleSoapServer and Wsdl components require manual WSDL generation and route mapping, which may demand custom middleware or Laravel service containers for seamless integration.php-soap alternatives like guzzlehttp/soap) suffice?auth vs. SOAP headers)?SoapFault → HttpException)?VCR for recordings)?php-soap (native extension) + custom wrappers been considered? Or modern alternatives like OpenAPI (Swagger)?BeSimpleSoapClient/Server as Laravel bindings.SoapClientFacade) for SOAP calls.laravel/symfony-bridge, the BeSimpleSoapBundle can be leveraged directly.HttpClient wrapper around SoapClient).SoapClient with BeSimpleSoapClient).BeSimpleSoapClient.BeSimpleSoapClient.$client = new \BeSimple\SoapClient\Client($wsdlUrl, [
'trace' => 1,
'exceptions' => true,
'features' => \BeSimple\SoapClient\Client::FEATURE_MTOM,
]);
BeSimpleSoapServer and bind it to a Laravel route:
Route::soap('service', function () {
return new \App\Services\SoapService();
});
BeSimpleSoapWsdl to generate WSDL dynamically or statically.HttpFoundation) may need alignment.php-soap extension must be enabled).SoapClient with BeSimpleSoapClient for consumption.BeSimpleSoapServer.besimple/soap to a specific version in composer.json.trace in SoapClient for request/response logging.Redis).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| SOAP Server Unavailable | API downtime | Retry logic + circuit breaker (e.g., spatie/fork). |
| Malformed SOAP Requests | 500 errors | Validate requests with BeSimpleSoapWsdl. |
| WS-Security Misconfiguration | Auth failures | Test with SoapUI before production. |
| WSDL Schema Changes | Breaking changes | Version WSDLs (e.g., /v1/wsdl). |
PHP soap Extension Missing |
Runtime errors | Ensure extension is enabled in php.ini. |
| Memory Leaks (Large SOAP Payloads) | Server crashes | Stream responses, use MTOM for binaries. |
How can I help you explore Laravel packages today?