I tried many way to establsih a connection with Magento API using SOAP and no luck. I already create a user only for the API and a new integration. And I am using this code.
<?php error_reporting(E_ALL); ini_set('display_errors', 1); $ opts = array( 'http'=>array( 'header' => 'Authorization: apiCOMM ayseg0vu47xfgtgt1ed2l4lupbfo4yyi' ) ); $ wsdlUrl = 'ccenet.mx/magento2/index.php/soap/default?wsdl=1&services=backendModuleServiceV1'; $ serviceArgs = array("id"=>1); $ context = stream_context_create($ opts); $ soapClient = new SoapClient($ wsdlUrl, ['version' => SOAP_1_2, 'context' => $ context]); $ soapResponse = $ soapClient->backendModuleServiceV1; ($ serviceArgs);
But I always recieved the following error:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘ccenet.mx/magento2/index.php/soap/default?wsdl=1&services=backendModuleServiceV1’ in /Users/dyohanan/Documents/localhost/version3/soapServicesDAN.php on line 22
and this one
SoapFault: SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘ccenet.mx/magento2/index.php/soap/default?wsdl=1&services=backendModuleServiceV1’ : failed to load external entity “ccenet.mx/magento2/index.php/soap/default?wsdl=1&services=backendModuleServiceV1” in /Users/dyohanan/Documents/localhost/version3/soapServicesDAN.php on line 22
I search in many forums and blogs but no luck at all.