SOAP-ERROR: Parsing WSDL: binding 'BillServicePortBinding' already defined

1

I have this problem trying to consume a webservice wsdl :

The code in php I am doing to consume the web service is as follows:

$wsdlURL = 'https://e-factura.sunat.gob.pe/ol-ti-itcpfegem/billService?wsdl';
$client  = new SoapClient($wsdlURL, array('trace' => true));
print_r($client);

This is the error:

  

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: 'BillServicePortBinding' already defined in C: \ xampp \ htdocs \ invoicePHP \ xmlFactura.php: 45 Stack trace

How can I solve it?

    
asked by Juan Vásquez Ventura 22.11.2016 в 23:08
source

2 answers

1

According to this official PHP page, it's a bug since version 5. *

What they recommend is use the implementation Pear SOAP

link

    
answered by 23.11.2016 в 02:00
0

The error is due to the fact that php does not support double "namespace" thing that does if java and c #. Luckily, it has an easy solution but you still have to take it carefully: link

    
answered by 30.11.2016 в 18:32