SIGEP WSDL problem

4

I'm a time with a project of the post office, I had to make a connection with the webservice SIGEP WEB, I found something already in development in, was using the same and everything OK, from one day to the other the same stopped working , I made some tests and noticed that the test webservice I can use normally, but the production of a timeout error.

I have valid users but it does not work, I created a simple script:


ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('error_reporting', 'E_ALL|E_STRICT');
error_reporting(E_ALL);

$client = new SoapClient("https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente?wsdl");

$function = 'buscaCliente';

$arguments= array('ConvertTemp' => array(
                        'idContrato' => "0000000000",
                        'idCartaoPostagem' => "0000000000",
                        'usuario'   => "usuario",
                        'senha'      => "senha"
                ));
$options = array('location' => "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente");
 echo "aqui";
$result = $client->__Call($function, $arguments, $options);

echo 'Response: ';

foreach($result as $row){
    foreach((object)$row->contratos->cartoesPostagem->servicos as $row2){
        echo $row2->codigo;
        echo "
"; } }

The same works in PHP 5.2 but does not work in PHP 5.3, the same timeout error occurs.

The system is developed in 5.3 and I need to maintain this.

Does anyone have a reason for this?

    
asked by anonymous 21.01.2016 / 19:47

1 answer

0

The index of the $arguments array can not be "ConvertTemp", it must be "ClientType".

$arguments= array('buscaCliente' => array(
                    'idContrato' => "0000000000",
                    'idCartaoPostagem' => "0000000000",
                    'usuario'   => "usuario",
                    'senha'      => "senha"
            ));
    
26.09.2016 / 22:34