Asynchronous, Parallel, Multi-Curl PHP SoapClient
Switch branches/tags
Nothing to show
Clone or download

Parallel, Multi-Curl PHP SoapClient

Build Status Software License Scrutinizer Code Quality codecov Packagist Donate Authoer Blog

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


  • 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


Anyone is welcome to contribute, however, if you decide to get involved, please take a moment to review the guidelines:


The code is available under the MIT license.