Comsum Web service in SOAP with large data volume, TIME OUT

1

I need to get a lot of data from a web service in SOAP, however depending on the query the server can not handle, I have seen in some articles, that this can be solved by xml compression or sending in parts, but I did not find examples.

I tried to loop and chain the requests for each record, but it did not work, it understands it to be 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.

    
asked by anonymous 22.06.2017 / 21:25

1 answer

1

Is the webservice outside or is it yours? If it's out you do not have control over it, however instead of having a giant loop, you can have 2 or 3 starting from different sites, one at index = 0 another at index = 10000 and you make a request for each of them and in the end you add the answers in an array or so.

    
22.06.2017 / 21:35