1
I need to take a lot of data from a web service in SOAP, but depending on the query the server does not hold, I have seen in some articles, that this can be solved by compression of xml or sending in parts, but I did not find examples.
I tried to loop and chain the requests for each record, but it didn’t work, it understands as if it was just a request.
foreach ($this->vg['marcas'] as $key => $value) {
$xmlr = new SimpleXMLElement('<CustumeSearch></CustumeSearch>');
$paramsSoap = array(
'categoria' => $tipoDados['nome'],
'idMarca' => $key,
'idModelo' => 0,
'HashSeguranca' => 'xxxx'
);
// Looping responsavel por adicionar propriedade e valores ao XML exemplo (codigoAnuncio => 292)
foreach($paramsSoap as $key => $value) {
$xmlr->addChild($key, $value);
}
$marcas = $this->vg['soap']->__soapCall(
"RetornarVersoes" ,
array($xmlr)
); ...
Fatal error: Uncaught Soapfault Exception: [Soap:Server] System.Web.Services.Protocols.Soapexception: Server was Unable to process request.
Good alternative, I will try, but I do not know if it will work because every time the index of looping alternates I restart the SOAP connection, and still not right.
– Felipe Duarte
You have to have a "shared memory" that is fixed, global variables that you change, that are in another file or something
– Inês de Matos