You can call a WSDL locally using PHP


I'm learning how to use Soapclient in PHP and it throws me an error when trying to consume a service:

This returns me the following error

Parsing WSDL BillServicePortBinding already defined

According to what I was investigating, it is because PHP does not support double namespaces, now it is said that the solution is to download the wsdl locally and consume it. the question is…can it be done locally? since php

$client = new SoapClient(null, array('location' => "http://localhost/soap.php", 'uri' => "http://test-uri/"));

Thanks in advance.


This is due to PHP bug #45282

You must implement this SOAP PERL package.

If you can get the webservice running from Eclipse and you have built it right you can get an instance like this:

new SoapClient("http://localhost:8080/ruta/services/Gestor?wsdl");
Scroll to Top