Dov
Dov

Reputation: 31

Possible to run multiple client connections in PHP SOAP?

I'm running SOAP and I have encountered a 500 internal server error, possibly due to lack of memory resources in a large loop.
Is it possible to run multiple simultaneous connections in SOAP (similar to curl_multi) and is there any examples of this in practise?

My main concern is keeping memory resources low whilst running a large amount of queries.

Is it also possible during output, to output each iteration of the loop as it passes? Currently it loads all of them at the same time.

Upvotes: 0

Views: 458

Answers (1)

Lars Strojny
Lars Strojny

Reputation: 665

Not with ext/soap, which is the default PHP SOAP extension. If your SOAP envelope is not that complicated and doesn't change often it might be an idea to use multi_curl and a hand-written SOAP envelope. But be careful not to introduce XML injections along the way (aka use DOMDocument or XMLWriter to create the envelope).

Upvotes: 1

Related Questions