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

                    Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

                    Log in Navigation menu

                    Invalid response line returned from server: HTTP/2 401 | ErrorPlease Please Help With Error 500 Internal Server Error after upgrading from 1.7 to 1.9Unable to place new customer orders in admin backendMagento - For “Manage Categories” Forbidden You do not have permission to access this documentHTTP ERROR 500 when using require(_once) app/Mage.phpMemcached causing Web Setup Wizard ErrorCould not create an acl object: Invalid XMLAn error occurred on the server. Please try to place the order againInvalid response line returned from server: HTTP/2 200 - message after update to 2.1.7Magento-CE 2.3.0 installation error on XamppMagento 2.2.6- After Migration all default Payment Methods are not working fine