SOAP-ERROR: Parsing WSDL: Couldn't load from URL Failed to load External EntitySOAP-ERROR: Parsing WSDL: Couldn't load fromSOAP-ERROR: Parsing WSDL: Couldn't load from : failed to load external entitySOAP error: Parsing WSDL: Couldn't load from “” failed to load external entitySOAP connection couldn't loadMagento 2 SOAP api not workingSoapClient fails with - Failed to load external entitySOAP WSDL Location URL incorrect when front-end URL different from admin URLSOAP-ERROR: Parsing WSDL: Couldn't load from 'myurl/api/soap/index/?wsdl=1' : Extra content at the end of the documentsoap api is not working in magento 1.9Magento - SOAP-ERROR: Parsing WSDL 2

Does a wizard need their hands free in order to cause their familiar from the Find Familiar spell to reappear?

Party going through airport security at separate times?

What's the point of having a RAID 1 configuration over incremental backups to a secondary drive?

Is it possible to split a vertex?

Misrepresented my work history

Did the Ottoman empire suppress the printing press?

Can I play a mimic PC?

How to tell someone I'd like to become friends without letting them think I'm romantically interested in them?

What happens to unproductive professors?

Is there a strong legal guarantee that the U.S. can give to another country that it won't attack them?

Why do you use the "park" gear to park a car and not only the handbrake?

Using Open with a filename that contains :

Backspace functionality in normal mode

What is a "Lear Processor" and how did it work?

Is it OK to leave real names & info visible in business card portfolio?

Is that a case of "DOUBLE-NEGATIVES" as claimed by Grammarly?

Swapping "Good" and "Bad"

Is there a nice way to implement a conditional type with default fail case?

Why different specifications for telescopes and binoculars?

Given a 32 bit number, what is an efficient way to scale each byte by a certain factor?

What are the indigenous English words for a prostitute?

Why would people still be chanting "Lock her up" at Trump rallies in 2019?

What is the correct parsing of お高くとまる?

Number of short hairs coming out of the base of the head Tefillin



SOAP-ERROR: Parsing WSDL: Couldn't load from URL Failed to load External Entity


SOAP-ERROR: Parsing WSDL: Couldn't load fromSOAP-ERROR: Parsing WSDL: Couldn't load from : failed to load external entitySOAP error: Parsing WSDL: Couldn't load from “” failed to load external entitySOAP connection couldn't loadMagento 2 SOAP api not workingSoapClient fails with - Failed to load external entitySOAP WSDL Location URL incorrect when front-end URL different from admin URLSOAP-ERROR: Parsing WSDL: Couldn't load from 'myurl/api/soap/index/?wsdl=1' : Extra content at the end of the documentsoap api is not working in magento 1.9Magento - SOAP-ERROR: Parsing WSDL 2






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I'm trying to get all products in $productArrarray from magento 2 API via SOAP client. I tried the below function but it throws this error:



Error:




SOAP-ERROR: Parsing WSDL: Couldn't load from
'https://shop.mysite.com/soap/default?wsdl&services=catalogProductRepositoryV1'
: failed to load external entity
"https://shop.mysite.com/soap/default?wsdl&services=catalogProductRepositoryV1"




Code:



public function getMagentoProducts() 

$productArr = array('' => 'Select Product');

try
$request = new SoapClient("https://shop.mysite.com/soap/?wsdl&services=integrationAdminTokenServiceV1", array("soap_version" => SOAP_1_2));
$token = $request->integrationAdminTokenServiceV1CreateAdminAccessToken(array("username"=>"user", "password"=>"pass"));
$opts = array(
'http'=>array(
'header' => 'Authorization: Bearer '.json_decode($token->result),
'user_agent' => 'PHPSoapClient'
),
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
$wsdlUrl = 'https://shop.mysite.com/soap/default?wsdl&services=catalogProductRepositoryV1';

$context = stream_context_create($opts);
$soapClientOptions = array(
'stream_context' => $context,
'cache_wsdl' => WSDL_CACHE_NONE
);
libxml_disable_entity_loader(false);

$soapClient = new SoapClient($wsdlUrl, ['version' => SOAP_1_2, 'context' => $soapClientOptions]);
var_dump($soapClient);exit;
$soapResponse = $soapClient->__getFunctions();


catch (Exception $e)

$this->forward404($e->getMessage());











share|improve this question




























    2















    I'm trying to get all products in $productArrarray from magento 2 API via SOAP client. I tried the below function but it throws this error:



    Error:




    SOAP-ERROR: Parsing WSDL: Couldn't load from
    'https://shop.mysite.com/soap/default?wsdl&services=catalogProductRepositoryV1'
    : failed to load external entity
    "https://shop.mysite.com/soap/default?wsdl&services=catalogProductRepositoryV1"




    Code:



    public function getMagentoProducts() 

    $productArr = array('' => 'Select Product');

    try
    $request = new SoapClient("https://shop.mysite.com/soap/?wsdl&services=integrationAdminTokenServiceV1", array("soap_version" => SOAP_1_2));
    $token = $request->integrationAdminTokenServiceV1CreateAdminAccessToken(array("username"=>"user", "password"=>"pass"));
    $opts = array(
    'http'=>array(
    'header' => 'Authorization: Bearer '.json_decode($token->result),
    'user_agent' => 'PHPSoapClient'
    ),
    'ssl' => array(
    'verify_peer' => false,
    'verify_peer_name' => false,
    'allow_self_signed' => true
    )
    );
    $wsdlUrl = 'https://shop.mysite.com/soap/default?wsdl&services=catalogProductRepositoryV1';

    $context = stream_context_create($opts);
    $soapClientOptions = array(
    'stream_context' => $context,
    'cache_wsdl' => WSDL_CACHE_NONE
    );
    libxml_disable_entity_loader(false);

    $soapClient = new SoapClient($wsdlUrl, ['version' => SOAP_1_2, 'context' => $soapClientOptions]);
    var_dump($soapClient);exit;
    $soapResponse = $soapClient->__getFunctions();


    catch (Exception $e)

    $this->forward404($e->getMessage());











    share|improve this question
























      2












      2








      2








      I'm trying to get all products in $productArrarray from magento 2 API via SOAP client. I tried the below function but it throws this error:



      Error:




      SOAP-ERROR: Parsing WSDL: Couldn't load from
      'https://shop.mysite.com/soap/default?wsdl&services=catalogProductRepositoryV1'
      : failed to load external entity
      "https://shop.mysite.com/soap/default?wsdl&services=catalogProductRepositoryV1"




      Code:



      public function getMagentoProducts() 

      $productArr = array('' => 'Select Product');

      try
      $request = new SoapClient("https://shop.mysite.com/soap/?wsdl&services=integrationAdminTokenServiceV1", array("soap_version" => SOAP_1_2));
      $token = $request->integrationAdminTokenServiceV1CreateAdminAccessToken(array("username"=>"user", "password"=>"pass"));
      $opts = array(
      'http'=>array(
      'header' => 'Authorization: Bearer '.json_decode($token->result),
      'user_agent' => 'PHPSoapClient'
      ),
      'ssl' => array(
      'verify_peer' => false,
      'verify_peer_name' => false,
      'allow_self_signed' => true
      )
      );
      $wsdlUrl = 'https://shop.mysite.com/soap/default?wsdl&services=catalogProductRepositoryV1';

      $context = stream_context_create($opts);
      $soapClientOptions = array(
      'stream_context' => $context,
      'cache_wsdl' => WSDL_CACHE_NONE
      );
      libxml_disable_entity_loader(false);

      $soapClient = new SoapClient($wsdlUrl, ['version' => SOAP_1_2, 'context' => $soapClientOptions]);
      var_dump($soapClient);exit;
      $soapResponse = $soapClient->__getFunctions();


      catch (Exception $e)

      $this->forward404($e->getMessage());











      share|improve this question














      I'm trying to get all products in $productArrarray from magento 2 API via SOAP client. I tried the below function but it throws this error:



      Error:




      SOAP-ERROR: Parsing WSDL: Couldn't load from
      'https://shop.mysite.com/soap/default?wsdl&services=catalogProductRepositoryV1'
      : failed to load external entity
      "https://shop.mysite.com/soap/default?wsdl&services=catalogProductRepositoryV1"




      Code:



      public function getMagentoProducts() 

      $productArr = array('' => 'Select Product');

      try
      $request = new SoapClient("https://shop.mysite.com/soap/?wsdl&services=integrationAdminTokenServiceV1", array("soap_version" => SOAP_1_2));
      $token = $request->integrationAdminTokenServiceV1CreateAdminAccessToken(array("username"=>"user", "password"=>"pass"));
      $opts = array(
      'http'=>array(
      'header' => 'Authorization: Bearer '.json_decode($token->result),
      'user_agent' => 'PHPSoapClient'
      ),
      'ssl' => array(
      'verify_peer' => false,
      'verify_peer_name' => false,
      'allow_self_signed' => true
      )
      );
      $wsdlUrl = 'https://shop.mysite.com/soap/default?wsdl&services=catalogProductRepositoryV1';

      $context = stream_context_create($opts);
      $soapClientOptions = array(
      'stream_context' => $context,
      'cache_wsdl' => WSDL_CACHE_NONE
      );
      libxml_disable_entity_loader(false);

      $soapClient = new SoapClient($wsdlUrl, ['version' => SOAP_1_2, 'context' => $soapClientOptions]);
      var_dump($soapClient);exit;
      $soapResponse = $soapClient->__getFunctions();


      catch (Exception $e)

      $this->forward404($e->getMessage());








      magento2 soap soap-api-v2 soap-api-v1 webapi






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 10 '18 at 16:27









      Iftikhar uddinIftikhar uddin

      1488 bronze badges




      1488 bronze badges




















          1 Answer
          1






          active

          oldest

          votes


















          0














          If you are using a development site with an SSL that is not signed by a major CA, then when PHP goes to load external entities from your domain, your SSL certificate can cause this error.



          I just had to add my root CA certificate that signed my SSL to the trusted roots of my server and the error went away.



          For Ubuntu 16.04 I added the PEM version of my root CA to /usr/local/share/ca-certificates then ran sudo update-ca-certificates and it was added.






          share|improve this answer

























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f233051%2fsoap-error-parsing-wsdl-couldnt-load-from-url-failed-to-load-external-entity%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            If you are using a development site with an SSL that is not signed by a major CA, then when PHP goes to load external entities from your domain, your SSL certificate can cause this error.



            I just had to add my root CA certificate that signed my SSL to the trusted roots of my server and the error went away.



            For Ubuntu 16.04 I added the PEM version of my root CA to /usr/local/share/ca-certificates then ran sudo update-ca-certificates and it was added.






            share|improve this answer



























              0














              If you are using a development site with an SSL that is not signed by a major CA, then when PHP goes to load external entities from your domain, your SSL certificate can cause this error.



              I just had to add my root CA certificate that signed my SSL to the trusted roots of my server and the error went away.



              For Ubuntu 16.04 I added the PEM version of my root CA to /usr/local/share/ca-certificates then ran sudo update-ca-certificates and it was added.






              share|improve this answer

























                0












                0








                0







                If you are using a development site with an SSL that is not signed by a major CA, then when PHP goes to load external entities from your domain, your SSL certificate can cause this error.



                I just had to add my root CA certificate that signed my SSL to the trusted roots of my server and the error went away.



                For Ubuntu 16.04 I added the PEM version of my root CA to /usr/local/share/ca-certificates then ran sudo update-ca-certificates and it was added.






                share|improve this answer













                If you are using a development site with an SSL that is not signed by a major CA, then when PHP goes to load external entities from your domain, your SSL certificate can cause this error.



                I just had to add my root CA certificate that signed my SSL to the trusted roots of my server and the error went away.



                For Ubuntu 16.04 I added the PEM version of my root CA to /usr/local/share/ca-certificates then ran sudo update-ca-certificates and it was added.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jul 16 '18 at 20:58









                BrettBrett

                1,5476 silver badges16 bronze badges




                1,5476 silver badges16 bronze badges



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f233051%2fsoap-error-parsing-wsdl-couldnt-load-from-url-failed-to-load-external-entity%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

                    Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?