Fatal error: Uncaught SoapFault exception: [2] Access deniedSOAP v2 catalogProductListOfAdditionalAttributes...

Were any external disk drives stacked vertically?

Can one be a co-translator of a book, if he does not know the language that the book is translated into?

How do conventional missiles fly?

Emailing HOD to enhance faculty application

Has there ever been an airliner design involving reducing generator load by installing solar panels?

Where does SFDX store details about scratch orgs?

Why doesn't H₄O²⁺ exist?

How to prevent "they're falling in love" trope

Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?

Does a druid starting with a bow start with no arrows?

What is the intuition behind short exact sequences of groups; in particular, what is the intuition behind group extensions?

Why is Collection not simply treated as Collection<?>

What do you call someone who asks many questions?

Modeling an IP Address

How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?

What to put in ESTA if staying in US for a few days before going on to Canada

I would say: "You are another teacher", but she is a woman and I am a man

Is "remove commented out code" correct English?

Blender 2.8 I can't see vertices, edges or faces in edit mode

In a spin, are both wings stalled?

Twin primes whose sum is a cube

Why can't we play rap on piano?

AES: Why is it a good practice to use only the first 16bytes of a hash for encryption?

Brothers & sisters



Fatal error: Uncaught SoapFault exception: [2] Access denied


SOAP v2 catalogProductListOfAdditionalAttributes Uncaught SoapFault exception: Access DeniedProblems calling Magento SOAP V2 Service in C#Magento SOAP api errror: Access deniedFatal error: Uncaught SoapFault exception: [Client] looks like we got no XML documentMagento Fatal error: Uncaught SoapFault exception [HTTP] Internal Server ErrorMagento 1.9.2 get customer address using soap apiSoapFault exception: [1] Internal Error after upgrading to magento 1.9.3API Access denied and 403 errorUncaught SoapFault exception: [SOAP-ENV:Client] Error cannot find parameterre: SOAP Error on Magento 1.9.3.8 -






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







2















I am trying to login via soap from an external server



$api_url_v2 = "http://www.example.com/api/v2_soap/?wsdl=1";
$username = 'username';
$password = 'password';
$cli = new SoapClient($api_url_v2);
$session_id = $cli->login($username, $password);


The error message I get is Fatal error:




Uncaught SoapFault exception: [2] Access denied




However if I look in the api_user table in magento db, then the lognum column increments by 1 when I have the correct username / password combo... so it seems like the system knows the details are correct, but is giving me access denied.



The users role I have ticked all options for and assigned the role to the user



I can't seem to see many examples of this issue anywhere.



Has anyone come accross this issue, or can you provide any tips to solve?










share|improve this question































    2















    I am trying to login via soap from an external server



    $api_url_v2 = "http://www.example.com/api/v2_soap/?wsdl=1";
    $username = 'username';
    $password = 'password';
    $cli = new SoapClient($api_url_v2);
    $session_id = $cli->login($username, $password);


    The error message I get is Fatal error:




    Uncaught SoapFault exception: [2] Access denied




    However if I look in the api_user table in magento db, then the lognum column increments by 1 when I have the correct username / password combo... so it seems like the system knows the details are correct, but is giving me access denied.



    The users role I have ticked all options for and assigned the role to the user



    I can't seem to see many examples of this issue anywhere.



    Has anyone come accross this issue, or can you provide any tips to solve?










    share|improve this question



























      2












      2








      2








      I am trying to login via soap from an external server



      $api_url_v2 = "http://www.example.com/api/v2_soap/?wsdl=1";
      $username = 'username';
      $password = 'password';
      $cli = new SoapClient($api_url_v2);
      $session_id = $cli->login($username, $password);


      The error message I get is Fatal error:




      Uncaught SoapFault exception: [2] Access denied




      However if I look in the api_user table in magento db, then the lognum column increments by 1 when I have the correct username / password combo... so it seems like the system knows the details are correct, but is giving me access denied.



      The users role I have ticked all options for and assigned the role to the user



      I can't seem to see many examples of this issue anywhere.



      Has anyone come accross this issue, or can you provide any tips to solve?










      share|improve this question
















      I am trying to login via soap from an external server



      $api_url_v2 = "http://www.example.com/api/v2_soap/?wsdl=1";
      $username = 'username';
      $password = 'password';
      $cli = new SoapClient($api_url_v2);
      $session_id = $cli->login($username, $password);


      The error message I get is Fatal error:




      Uncaught SoapFault exception: [2] Access denied




      However if I look in the api_user table in magento db, then the lognum column increments by 1 when I have the correct username / password combo... so it seems like the system knows the details are correct, but is giving me access denied.



      The users role I have ticked all options for and assigned the role to the user



      I can't seem to see many examples of this issue anywhere.



      Has anyone come accross this issue, or can you provide any tips to solve?







      api soap






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 20 '15 at 13:57









      7ochem

      5,84493768




      5,84493768










      asked Sep 18 '13 at 21:48









      eleven11eleven11

      3004720




      3004720






















          5 Answers
          5






          active

          oldest

          votes


















          2














          Please try this connection code:



          $client = new SoapClient('http://magentohost/api/v2_soap?wsdl=1');
          $session = $client->login('apiUser', 'apiKey');


          I took it from the API Guidlines here:
          http://www.magentocommerce.com/api/soap/introduction.html#Introduction-SOAPAPIVersionv2



          I have also used this method on my stores for product retrieval and editting, however, are you on version 1.6.2? I know there is a role setting bug that doesnt allow you to set all roles.



          Suggestions:
          Provide version number, edition & url if possible.






          REVISION:

          $client = new SoapClient('http://www.comain.co.uk/api/v2_soap?wsdl=1');
          $session = $client->login('username', 'apikey');

          $result = $client->catalogInventoryStockItemList($session, array('27847')); // Products ID
          print_r($result);


          The above code has just been tested on my server which seems to be succesfull with this result:



          Array ( [0] => stdClass Object ( [product_id] => 27847 [sku] => VKC450O [qty] => 0.0000 [is_in_stock] => 1 ) )


          Let me know how you get on.






          share|improve this answer


























          • Thats the same code as i am already using right? Magento version 1.7.0.2

            – eleven11
            Sep 18 '13 at 22:44











          • Yes, without using lots of variables, and keeping it simpler, could you provide url link? Also, are you in WS-I COMPLIANCE mode or not?

            – Adam Kernig
            Sep 18 '13 at 22:45













          • WS-I COMPLIANCE - No.. But this is an issue with logging in, not anything to do with requests or XML formats

            – eleven11
            Sep 18 '13 at 23:57











          • I have editted my answer

            – Adam Kernig
            Sep 19 '13 at 9:03






          • 3





            ok i fixed it... In this table api_role.. There was an entry for a user (role_type = U). For each one of these users, there needs to be a role_id (role_type = G) that has an id of the users parent_id.. So i deleted the user with no referenced parent and it fixed the issue

            – eleven11
            Sep 19 '13 at 14:17





















          0














          ini_set("soap.wsdl_cache_enabled", "0");
          $client = new SoapClient(
          'http://127.0.0.1/magento/api/v2_soap/?wsdl'
          );

          $session = $client->login('imran', '654321imran');

          $result = $client->catalogProductList($session,'sku');

          print_r($result->product_id);

          $client->endSession($session);





          share|improve this answer





















          • 1





            It would be much better if you provide some explanation as well with the code.

            – Prateek
            Oct 20 '15 at 13:00



















          0














          One idea: load the WSDL-config with cUrl like this example and try it again:



          // GET SOAP-WSDL AS TEMP-FILE
          // ==========================

          $objCURL = curl_init([API-URL]); // Set API-URL
          curl_setopt($objCURL,CURLOPT_RETURNTRANSFER, true);
          $strWSDLFile = curl_exec($objCURL);
          curl_close($objCURL);

          file_put_contents('wsdl_temp.xml',$strWSDLFile);

          // INIT SOAP-SESSION
          // =================

          try {
          $soap = new SoapClient('wsdl_temp.xml');
          $soapSession = $soap->login([API-User], [API-Key]);
          } catch(Exception $e) {
          var_dump($e);
          }


          This solves all MY problems with the API. :-)






          share|improve this answer































            0














            The solution is to

            1. create a new SOAP/XML-RPX Roles, say "Test"

            2. in Role Resources just select "All" for Resource Access (just for testing)

            3. Edit the user and assign the Role to "Test"






            share|improve this answer































              0














              SoapFault: Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



              In fact, if I use Soap in http://localhost/.... it works, the connection is successful, but if I use same methods with in external IP and a port (like http://82.82.10.10:8080/...) returns this error:



              Fatal error: Uncaught SoapFault exception: [HTTP] Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



              SoapFault: Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



              The firewall is disabled, the ports are open. I do not know what to look for.






              share|improve this answer








              New contributor




              Cvasipedia Cvasipedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.





















                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%2f8187%2ffatal-error-uncaught-soapfault-exception-2-access-denied%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                5 Answers
                5






                active

                oldest

                votes








                5 Answers
                5






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                2














                Please try this connection code:



                $client = new SoapClient('http://magentohost/api/v2_soap?wsdl=1');
                $session = $client->login('apiUser', 'apiKey');


                I took it from the API Guidlines here:
                http://www.magentocommerce.com/api/soap/introduction.html#Introduction-SOAPAPIVersionv2



                I have also used this method on my stores for product retrieval and editting, however, are you on version 1.6.2? I know there is a role setting bug that doesnt allow you to set all roles.



                Suggestions:
                Provide version number, edition & url if possible.






                REVISION:

                $client = new SoapClient('http://www.comain.co.uk/api/v2_soap?wsdl=1');
                $session = $client->login('username', 'apikey');

                $result = $client->catalogInventoryStockItemList($session, array('27847')); // Products ID
                print_r($result);


                The above code has just been tested on my server which seems to be succesfull with this result:



                Array ( [0] => stdClass Object ( [product_id] => 27847 [sku] => VKC450O [qty] => 0.0000 [is_in_stock] => 1 ) )


                Let me know how you get on.






                share|improve this answer


























                • Thats the same code as i am already using right? Magento version 1.7.0.2

                  – eleven11
                  Sep 18 '13 at 22:44











                • Yes, without using lots of variables, and keeping it simpler, could you provide url link? Also, are you in WS-I COMPLIANCE mode or not?

                  – Adam Kernig
                  Sep 18 '13 at 22:45













                • WS-I COMPLIANCE - No.. But this is an issue with logging in, not anything to do with requests or XML formats

                  – eleven11
                  Sep 18 '13 at 23:57











                • I have editted my answer

                  – Adam Kernig
                  Sep 19 '13 at 9:03






                • 3





                  ok i fixed it... In this table api_role.. There was an entry for a user (role_type = U). For each one of these users, there needs to be a role_id (role_type = G) that has an id of the users parent_id.. So i deleted the user with no referenced parent and it fixed the issue

                  – eleven11
                  Sep 19 '13 at 14:17


















                2














                Please try this connection code:



                $client = new SoapClient('http://magentohost/api/v2_soap?wsdl=1');
                $session = $client->login('apiUser', 'apiKey');


                I took it from the API Guidlines here:
                http://www.magentocommerce.com/api/soap/introduction.html#Introduction-SOAPAPIVersionv2



                I have also used this method on my stores for product retrieval and editting, however, are you on version 1.6.2? I know there is a role setting bug that doesnt allow you to set all roles.



                Suggestions:
                Provide version number, edition & url if possible.






                REVISION:

                $client = new SoapClient('http://www.comain.co.uk/api/v2_soap?wsdl=1');
                $session = $client->login('username', 'apikey');

                $result = $client->catalogInventoryStockItemList($session, array('27847')); // Products ID
                print_r($result);


                The above code has just been tested on my server which seems to be succesfull with this result:



                Array ( [0] => stdClass Object ( [product_id] => 27847 [sku] => VKC450O [qty] => 0.0000 [is_in_stock] => 1 ) )


                Let me know how you get on.






                share|improve this answer


























                • Thats the same code as i am already using right? Magento version 1.7.0.2

                  – eleven11
                  Sep 18 '13 at 22:44











                • Yes, without using lots of variables, and keeping it simpler, could you provide url link? Also, are you in WS-I COMPLIANCE mode or not?

                  – Adam Kernig
                  Sep 18 '13 at 22:45













                • WS-I COMPLIANCE - No.. But this is an issue with logging in, not anything to do with requests or XML formats

                  – eleven11
                  Sep 18 '13 at 23:57











                • I have editted my answer

                  – Adam Kernig
                  Sep 19 '13 at 9:03






                • 3





                  ok i fixed it... In this table api_role.. There was an entry for a user (role_type = U). For each one of these users, there needs to be a role_id (role_type = G) that has an id of the users parent_id.. So i deleted the user with no referenced parent and it fixed the issue

                  – eleven11
                  Sep 19 '13 at 14:17
















                2












                2








                2







                Please try this connection code:



                $client = new SoapClient('http://magentohost/api/v2_soap?wsdl=1');
                $session = $client->login('apiUser', 'apiKey');


                I took it from the API Guidlines here:
                http://www.magentocommerce.com/api/soap/introduction.html#Introduction-SOAPAPIVersionv2



                I have also used this method on my stores for product retrieval and editting, however, are you on version 1.6.2? I know there is a role setting bug that doesnt allow you to set all roles.



                Suggestions:
                Provide version number, edition & url if possible.






                REVISION:

                $client = new SoapClient('http://www.comain.co.uk/api/v2_soap?wsdl=1');
                $session = $client->login('username', 'apikey');

                $result = $client->catalogInventoryStockItemList($session, array('27847')); // Products ID
                print_r($result);


                The above code has just been tested on my server which seems to be succesfull with this result:



                Array ( [0] => stdClass Object ( [product_id] => 27847 [sku] => VKC450O [qty] => 0.0000 [is_in_stock] => 1 ) )


                Let me know how you get on.






                share|improve this answer















                Please try this connection code:



                $client = new SoapClient('http://magentohost/api/v2_soap?wsdl=1');
                $session = $client->login('apiUser', 'apiKey');


                I took it from the API Guidlines here:
                http://www.magentocommerce.com/api/soap/introduction.html#Introduction-SOAPAPIVersionv2



                I have also used this method on my stores for product retrieval and editting, however, are you on version 1.6.2? I know there is a role setting bug that doesnt allow you to set all roles.



                Suggestions:
                Provide version number, edition & url if possible.






                REVISION:

                $client = new SoapClient('http://www.comain.co.uk/api/v2_soap?wsdl=1');
                $session = $client->login('username', 'apikey');

                $result = $client->catalogInventoryStockItemList($session, array('27847')); // Products ID
                print_r($result);


                The above code has just been tested on my server which seems to be succesfull with this result:



                Array ( [0] => stdClass Object ( [product_id] => 27847 [sku] => VKC450O [qty] => 0.0000 [is_in_stock] => 1 ) )


                Let me know how you get on.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Sep 19 '13 at 9:04

























                answered Sep 18 '13 at 22:34









                Adam KernigAdam Kernig

                1588




                1588













                • Thats the same code as i am already using right? Magento version 1.7.0.2

                  – eleven11
                  Sep 18 '13 at 22:44











                • Yes, without using lots of variables, and keeping it simpler, could you provide url link? Also, are you in WS-I COMPLIANCE mode or not?

                  – Adam Kernig
                  Sep 18 '13 at 22:45













                • WS-I COMPLIANCE - No.. But this is an issue with logging in, not anything to do with requests or XML formats

                  – eleven11
                  Sep 18 '13 at 23:57











                • I have editted my answer

                  – Adam Kernig
                  Sep 19 '13 at 9:03






                • 3





                  ok i fixed it... In this table api_role.. There was an entry for a user (role_type = U). For each one of these users, there needs to be a role_id (role_type = G) that has an id of the users parent_id.. So i deleted the user with no referenced parent and it fixed the issue

                  – eleven11
                  Sep 19 '13 at 14:17





















                • Thats the same code as i am already using right? Magento version 1.7.0.2

                  – eleven11
                  Sep 18 '13 at 22:44











                • Yes, without using lots of variables, and keeping it simpler, could you provide url link? Also, are you in WS-I COMPLIANCE mode or not?

                  – Adam Kernig
                  Sep 18 '13 at 22:45













                • WS-I COMPLIANCE - No.. But this is an issue with logging in, not anything to do with requests or XML formats

                  – eleven11
                  Sep 18 '13 at 23:57











                • I have editted my answer

                  – Adam Kernig
                  Sep 19 '13 at 9:03






                • 3





                  ok i fixed it... In this table api_role.. There was an entry for a user (role_type = U). For each one of these users, there needs to be a role_id (role_type = G) that has an id of the users parent_id.. So i deleted the user with no referenced parent and it fixed the issue

                  – eleven11
                  Sep 19 '13 at 14:17



















                Thats the same code as i am already using right? Magento version 1.7.0.2

                – eleven11
                Sep 18 '13 at 22:44





                Thats the same code as i am already using right? Magento version 1.7.0.2

                – eleven11
                Sep 18 '13 at 22:44













                Yes, without using lots of variables, and keeping it simpler, could you provide url link? Also, are you in WS-I COMPLIANCE mode or not?

                – Adam Kernig
                Sep 18 '13 at 22:45







                Yes, without using lots of variables, and keeping it simpler, could you provide url link? Also, are you in WS-I COMPLIANCE mode or not?

                – Adam Kernig
                Sep 18 '13 at 22:45















                WS-I COMPLIANCE - No.. But this is an issue with logging in, not anything to do with requests or XML formats

                – eleven11
                Sep 18 '13 at 23:57





                WS-I COMPLIANCE - No.. But this is an issue with logging in, not anything to do with requests or XML formats

                – eleven11
                Sep 18 '13 at 23:57













                I have editted my answer

                – Adam Kernig
                Sep 19 '13 at 9:03





                I have editted my answer

                – Adam Kernig
                Sep 19 '13 at 9:03




                3




                3





                ok i fixed it... In this table api_role.. There was an entry for a user (role_type = U). For each one of these users, there needs to be a role_id (role_type = G) that has an id of the users parent_id.. So i deleted the user with no referenced parent and it fixed the issue

                – eleven11
                Sep 19 '13 at 14:17







                ok i fixed it... In this table api_role.. There was an entry for a user (role_type = U). For each one of these users, there needs to be a role_id (role_type = G) that has an id of the users parent_id.. So i deleted the user with no referenced parent and it fixed the issue

                – eleven11
                Sep 19 '13 at 14:17















                0














                ini_set("soap.wsdl_cache_enabled", "0");
                $client = new SoapClient(
                'http://127.0.0.1/magento/api/v2_soap/?wsdl'
                );

                $session = $client->login('imran', '654321imran');

                $result = $client->catalogProductList($session,'sku');

                print_r($result->product_id);

                $client->endSession($session);





                share|improve this answer





















                • 1





                  It would be much better if you provide some explanation as well with the code.

                  – Prateek
                  Oct 20 '15 at 13:00
















                0














                ini_set("soap.wsdl_cache_enabled", "0");
                $client = new SoapClient(
                'http://127.0.0.1/magento/api/v2_soap/?wsdl'
                );

                $session = $client->login('imran', '654321imran');

                $result = $client->catalogProductList($session,'sku');

                print_r($result->product_id);

                $client->endSession($session);





                share|improve this answer





















                • 1





                  It would be much better if you provide some explanation as well with the code.

                  – Prateek
                  Oct 20 '15 at 13:00














                0












                0








                0







                ini_set("soap.wsdl_cache_enabled", "0");
                $client = new SoapClient(
                'http://127.0.0.1/magento/api/v2_soap/?wsdl'
                );

                $session = $client->login('imran', '654321imran');

                $result = $client->catalogProductList($session,'sku');

                print_r($result->product_id);

                $client->endSession($session);





                share|improve this answer















                ini_set("soap.wsdl_cache_enabled", "0");
                $client = new SoapClient(
                'http://127.0.0.1/magento/api/v2_soap/?wsdl'
                );

                $session = $client->login('imran', '654321imran');

                $result = $client->catalogProductList($session,'sku');

                print_r($result->product_id);

                $client->endSession($session);






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Oct 20 '15 at 12:57









                Marius

                168k28322688




                168k28322688










                answered Oct 20 '15 at 12:34









                user32284user32284

                1




                1








                • 1





                  It would be much better if you provide some explanation as well with the code.

                  – Prateek
                  Oct 20 '15 at 13:00














                • 1





                  It would be much better if you provide some explanation as well with the code.

                  – Prateek
                  Oct 20 '15 at 13:00








                1




                1





                It would be much better if you provide some explanation as well with the code.

                – Prateek
                Oct 20 '15 at 13:00





                It would be much better if you provide some explanation as well with the code.

                – Prateek
                Oct 20 '15 at 13:00











                0














                One idea: load the WSDL-config with cUrl like this example and try it again:



                // GET SOAP-WSDL AS TEMP-FILE
                // ==========================

                $objCURL = curl_init([API-URL]); // Set API-URL
                curl_setopt($objCURL,CURLOPT_RETURNTRANSFER, true);
                $strWSDLFile = curl_exec($objCURL);
                curl_close($objCURL);

                file_put_contents('wsdl_temp.xml',$strWSDLFile);

                // INIT SOAP-SESSION
                // =================

                try {
                $soap = new SoapClient('wsdl_temp.xml');
                $soapSession = $soap->login([API-User], [API-Key]);
                } catch(Exception $e) {
                var_dump($e);
                }


                This solves all MY problems with the API. :-)






                share|improve this answer




























                  0














                  One idea: load the WSDL-config with cUrl like this example and try it again:



                  // GET SOAP-WSDL AS TEMP-FILE
                  // ==========================

                  $objCURL = curl_init([API-URL]); // Set API-URL
                  curl_setopt($objCURL,CURLOPT_RETURNTRANSFER, true);
                  $strWSDLFile = curl_exec($objCURL);
                  curl_close($objCURL);

                  file_put_contents('wsdl_temp.xml',$strWSDLFile);

                  // INIT SOAP-SESSION
                  // =================

                  try {
                  $soap = new SoapClient('wsdl_temp.xml');
                  $soapSession = $soap->login([API-User], [API-Key]);
                  } catch(Exception $e) {
                  var_dump($e);
                  }


                  This solves all MY problems with the API. :-)






                  share|improve this answer


























                    0












                    0








                    0







                    One idea: load the WSDL-config with cUrl like this example and try it again:



                    // GET SOAP-WSDL AS TEMP-FILE
                    // ==========================

                    $objCURL = curl_init([API-URL]); // Set API-URL
                    curl_setopt($objCURL,CURLOPT_RETURNTRANSFER, true);
                    $strWSDLFile = curl_exec($objCURL);
                    curl_close($objCURL);

                    file_put_contents('wsdl_temp.xml',$strWSDLFile);

                    // INIT SOAP-SESSION
                    // =================

                    try {
                    $soap = new SoapClient('wsdl_temp.xml');
                    $soapSession = $soap->login([API-User], [API-Key]);
                    } catch(Exception $e) {
                    var_dump($e);
                    }


                    This solves all MY problems with the API. :-)






                    share|improve this answer













                    One idea: load the WSDL-config with cUrl like this example and try it again:



                    // GET SOAP-WSDL AS TEMP-FILE
                    // ==========================

                    $objCURL = curl_init([API-URL]); // Set API-URL
                    curl_setopt($objCURL,CURLOPT_RETURNTRANSFER, true);
                    $strWSDLFile = curl_exec($objCURL);
                    curl_close($objCURL);

                    file_put_contents('wsdl_temp.xml',$strWSDLFile);

                    // INIT SOAP-SESSION
                    // =================

                    try {
                    $soap = new SoapClient('wsdl_temp.xml');
                    $soapSession = $soap->login([API-User], [API-Key]);
                    } catch(Exception $e) {
                    var_dump($e);
                    }


                    This solves all MY problems with the API. :-)







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Oct 20 '15 at 13:34









                    SFreySFrey

                    1169




                    1169























                        0














                        The solution is to

                        1. create a new SOAP/XML-RPX Roles, say "Test"

                        2. in Role Resources just select "All" for Resource Access (just for testing)

                        3. Edit the user and assign the Role to "Test"






                        share|improve this answer




























                          0














                          The solution is to

                          1. create a new SOAP/XML-RPX Roles, say "Test"

                          2. in Role Resources just select "All" for Resource Access (just for testing)

                          3. Edit the user and assign the Role to "Test"






                          share|improve this answer


























                            0












                            0








                            0







                            The solution is to

                            1. create a new SOAP/XML-RPX Roles, say "Test"

                            2. in Role Resources just select "All" for Resource Access (just for testing)

                            3. Edit the user and assign the Role to "Test"






                            share|improve this answer













                            The solution is to

                            1. create a new SOAP/XML-RPX Roles, say "Test"

                            2. in Role Resources just select "All" for Resource Access (just for testing)

                            3. Edit the user and assign the Role to "Test"







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 16 '16 at 19:54









                            darleysdarleys

                            1




                            1























                                0














                                SoapFault: Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



                                In fact, if I use Soap in http://localhost/.... it works, the connection is successful, but if I use same methods with in external IP and a port (like http://82.82.10.10:8080/...) returns this error:



                                Fatal error: Uncaught SoapFault exception: [HTTP] Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



                                SoapFault: Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



                                The firewall is disabled, the ports are open. I do not know what to look for.






                                share|improve this answer








                                New contributor




                                Cvasipedia Cvasipedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.

























                                  0














                                  SoapFault: Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



                                  In fact, if I use Soap in http://localhost/.... it works, the connection is successful, but if I use same methods with in external IP and a port (like http://82.82.10.10:8080/...) returns this error:



                                  Fatal error: Uncaught SoapFault exception: [HTTP] Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



                                  SoapFault: Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



                                  The firewall is disabled, the ports are open. I do not know what to look for.






                                  share|improve this answer








                                  New contributor




                                  Cvasipedia Cvasipedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                  Check out our Code of Conduct.























                                    0












                                    0








                                    0







                                    SoapFault: Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



                                    In fact, if I use Soap in http://localhost/.... it works, the connection is successful, but if I use same methods with in external IP and a port (like http://82.82.10.10:8080/...) returns this error:



                                    Fatal error: Uncaught SoapFault exception: [HTTP] Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



                                    SoapFault: Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



                                    The firewall is disabled, the ports are open. I do not know what to look for.






                                    share|improve this answer








                                    New contributor




                                    Cvasipedia Cvasipedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.










                                    SoapFault: Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



                                    In fact, if I use Soap in http://localhost/.... it works, the connection is successful, but if I use same methods with in external IP and a port (like http://82.82.10.10:8080/...) returns this error:



                                    Fatal error: Uncaught SoapFault exception: [HTTP] Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



                                    SoapFault: Forbidden in C:Program Files (x86)Amppswwwsoapclass_01.php on line 128



                                    The firewall is disabled, the ports are open. I do not know what to look for.







                                    share|improve this answer








                                    New contributor




                                    Cvasipedia Cvasipedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.









                                    share|improve this answer



                                    share|improve this answer






                                    New contributor




                                    Cvasipedia Cvasipedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.









                                    answered 11 mins ago









                                    Cvasipedia CvasipediaCvasipedia Cvasipedia

                                    1




                                    1




                                    New contributor




                                    Cvasipedia Cvasipedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.





                                    New contributor





                                    Cvasipedia Cvasipedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.






                                    Cvasipedia Cvasipedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.






























                                        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%2f8187%2ffatal-error-uncaught-soapfault-exception-2-access-denied%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

                                        “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

                                        How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

                                        夢乃愛華...