In the E-conomic API bundle, a php example file is located at e-conomic_API_1.4.0\php\list_debtors.php.
I have tried to run the file, on my local XMAPP server like this:
- Code: Select all
http://localhost:81/list_debtors.php?agreementNumber=123456&username=myUser&password=myPass
I get the following error when creating the SoapClient:
- Code: Select all
Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity "https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL" in C:\xampp\htdocs\list_debtors.php on line 40
SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL' : failed to load external entity "https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL"
Fatal error: Call to a member function Disconnect() on a non-object in C:\xampp\htdocs\list_debtors.php on line 230
Having the source code for the API, i compiled a new E-conomic_API.dll, which hit the webservice running on localhost.
So i changed list_debtors.php line 37
- Code: Select all
//$wsdlUrl = 'https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL'; to this one
$wsdlUrl = 'http://localhost/api1/EconomicWebService.asmx?WSDL';
adn suddenly my example works.
What am I doing wrong here?
I have tried different approaches:
- Adding the necessary SSL modules to Apache httpd.conf (think it was already set up)
- Code: Select all
LoadModule ssl_module modules/mod_ssl.so
- Adding the necessary SSL modules to the PHP.ini
- Code: Select all
extension=php_openssl.dll
- disabling errologging
- Code: Select all
$orig_error_reporting = error_reporting();
error_reporting(0);
$this->soap = new SoapClient('https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL');
$client = new SoapClient($wsdlUrl, array("trace" => 1, "exceptions" => 1));
error_reporting($orig_error_reporting);
None of these actions helped, so I installed Wireshark, and it turns out, that no TCP is being sent out, when I try to run the example using
$wsdlUrl = 'https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL';
If someone has any good ideas to solve this problem, please let me know.

