API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

Problems using XAMPP with PHP and https

0
I was wondering if anyone has experience with accessing the E-conomic API using PHP(SOAP). We are currently experiencing problems running the example internally (at E-conomic, yes a bit embarrasing) and therefore I wanted to get to the bottom of the problem. So I downloaded and installed the XAMPP package, allowing me to run .php files locally. ( To clarify: I want to run the example locally, hitting the LIVE E-conomicWebservice)
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:
http//localhost81/list_debtorsphp?agreementNumber=123456username=myUserpassword=myPass

I get the following error when creating the SoapClient:

Warning SoapClientSoapClient() soapclientsoapclient I/O warning  failed to load external entity https//wwwe-conomiccom/secure/api1/EconomicWebserviceasmx?WSDL in C\xampp\htdocs\list_debtorsphp on line 40

SOAP-ERROR Parsing WSDL Couldn't load from 'https//wwwe-conomiccom/secure/api1/EconomicWebserviceasmx?WSDL'  failed to load external entity https//wwwe-conomiccom/secure/api1/EconomicWebserviceasmx?WSDL

Fatal error Call to a member function Disconnect() on a non-object in C\xampp\htdocs\list_debtorsphp 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
//$wsdlUrl = 'https//wwwe-conomiccom/secure/api1/EconomicWebserviceasmx?WSDL'; to this one
$wsdlUrl = 'http//localhost/api1/EconomicWebServiceasmx?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)
    LoadModule ssl_module modules/mod_sslso
Adding the necessary SSL modules to the PHP.ini
    extension=php_openssldll     
disabling errologging
    $orig_error_reporting = error_reporting();
    error_reporting(0);
    $this-soap = new SoapClient('https//wwwe-conomiccom/secure/api1/EconomicWebserviceasmx?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.
created May 20, 2009 by fsa
0% Accept Rate
Q 3 A 0 C 0

2 Answers

0
Haven't tried using the API myself yet, still waiting for some feedback from support, however was just browsing through the forums and noticed this.

Have you checked the SSL is actually enabled (just because we ask our servers nicely to do something doesn't mean it actually does it)?  To me it sounds like your PHP can't find a handler for https streams.

Also reading this:
http://www.webmasterworld.com/php/3764607.htm
Look for the libaey32.dll, might be that?
answered Jul 9, 2009 by mmo
0
I met the same problems when i some days ago was starting up with PHP and SOAP in XAMP.

I searced on the net and got the advice that SYSTEM must have acces rigths for the libaey32.dll file  in properties.

Also my phpinfo said that SOAP was turned even it semed like the SOAP extension was not turned on in the php.ini. Try to uncoment that extension.

When i did that and restarted the computer php was able to create a client on economic.

What the real problem was i dont know, but it worked :)

Regards Christian
answered Jul 19, 2013 by cheyn
Visma e-conomic A/S
...