No. pub.publish:publish is for async activity only. publishAndWait mimics synchronous communication and must be explicitly supported by the service that is invoked in this manner (ie. it must do an explicit response).
“…the service will stop execution until it gets a response !!”
Of course. That’s the nature of synchronous communications.
Instead of trying to introduce threading (which will complicate things considerably for not much benefit) you might explore the possibility of passing the complete array to the backend and let it do the looping. Communication and control-wise that will be much easier (and faster) to do.
Forgot to ask: Does the caller to you have a user waiting on the response? If this is just an automated integration, with some program calling your service via SOAP, then it is unlikely that the amount of time spent making the calls to the backend in a serial approach is meaningful.
#API-Management#webMethods#soa