meabed / php-parallel-soap
Multi curl SoapClient that allow to perform multiple requests to SoapServer
Requires (Dev)
- overtrue/phplint: 9.0.4
- phpstan/phpstan: 1.10.26
- phpunit/phpunit: ~9|~10
- squizlabs/php_codesniffer: 3.7.2
This package is auto-updated.
Last update: 2024-12-21 06:33:14 UTC
README
Parallel, Multi-Curl PHP SoapClient
Parallel Multi-Curl SoapClient that allow us to perform Parallel multiple requests to SoapServer using CURL.
Working with soap is always frustrating for few reasons:
- SOAP Messages are complicated and obscure
- Always slow Performance as lack for connection pooling, ssl sharing, tcp tweaking options that comes with curl
- Sequential Execution in array of multiple requests there no other way except looping and synchronously send request after another
- debugging with ability to understand how and what goes through the HTTP " Headers / Request Payload / Response Headers / Response Payload / Error structure etc..."
This Client will allow you send request in parallel, while give you ability to hook in the clinet "Logger / Result Function / Customer curl options like tcp connections reusing and ssl session sharing"
See the Examples to see how to use it.
Comment in the Example are written to help you understand how the client works and what you can do with it and how to customize it to fit your purpose!
Example WSDL
Features
- Client can work in parallel (multi) and Synchronous (single) mode.
- Multiple calls using curl_multi_exec, Does not wait for soap consecutive calls ! This client will save a lot of time and resources doing multiple requests at same time!
- SSL / Session Sharing.
- __curl_info meta data in response object.
- Each Request has hash id which is unique to each request ( If you execute the same request 100 times more, it will have the same hash ) so no duplicate requests
- Very Easy to debug every single point during the request! also ability to use CURL_VERBOSE to debug the connections to the Soap Host
- Very easy exception handling in parallel mode
SOAP Facts
- SOAP is HTTP Post with structured message in XML Envelope and SOAPAction Header.
- SOAPAction header is used in web services for various reason, most common
- Route request to specific action
- Serve Multi-Version of service, if Action Method is part of the XML Envelope
Need Help?
If you ever hated SOAP for complexity or performance and you cannot take it anymore, I could help! drop me a line here meabed.com
Contributing
Anyone is welcome to contribute, however, if you decide to get involved, please take a moment to review the guidelines:
- Only one feature or change per pull request
- Write meaningful commit messages
- Follow the existing coding standards
License
The code is available under the MIT license.