I am using a webservice in which I make the SOAP connection in PHP.
The problem comes when, on the first call, sometimes the data is not retrieved and you have to click again on the query button to view them.
Is there a way for this connection to be pre-loaded, or something similar, to work from the first connection?
The code I use is this:
$servicio="http://126.96.36.199/WS/Ws.asmx?WSDL"; $client = new SoapClient($servicio, $parametros); $result = $client->getContratos($parametros);
I make the call when there is a check selected on the web.
In $ parameters there are different parameters, according to what has been filled in by the user.
As I say above, the first time it acts it always returns blank, but from the second it works perfectly.
If you test it directly on the webservice console, it's fine, always.