Magento 2.3 call api rest externRest Api - call custom rest api functionMagento SOAP (v1) API causes fatal error getSelect() after completed orderBlank Filters Using PHP SoapClient to Make Calls into WSI-Compliant APIREST api call for Guest userMagento 2 Custom Web Api callMagento 2 call external REST apiSimple Magento 2 rest API?Use Magento 2 Web API to pull product dataHow to overwrite customer registration REST API in magento 2.3Magento 2.3 Custom Rest Api get size limit

How can God warn people of the upcoming rapture without disrupting society?

When does Tiana, Ship's Caretaker check card type?

Why does chown not work in RUN command in Docker?

Is there any way to stop a user from creating executables and running them?

How would timezones work on a planet 100 times the size of our Earth

Why aren't rainbows blurred-out into nothing after they are produced?

When were the tantalum capacitors first used in computing?

Can sampling rate be a floating point number?

A continuous water "planet" ring around a star

If clocks themselves are based on light signals, wouldn't we expect the measured speed of light to always be the same constant?

Do beef farmed pastures net remove carbon emissions?

What is my malfunctioning AI harvesting from humans?

Heat equation: Squiggly lines

How many people would you need to pull a whale over cobblestone streets?

Do I have to cite common CS algorithms?

How to retreive domain name from salesforce org

How can I decide if my homebrew item should require attunement?

How to write hyperlinks to local files in GeoJSON properties?

Plotting octahedron inside the sphere and sphere inside the cube

What is a good class if we remove subclasses?

Are differences between uniformly distributed numbers uniformly distributed?

Is God unknowable?

Enigma between Collegues (Part1)

What is this "Table of astronomy" about?



Magento 2.3 call api rest extern


Rest Api - call custom rest api functionMagento SOAP (v1) API causes fatal error getSelect() after completed orderBlank Filters Using PHP SoapClient to Make Calls into WSI-Compliant APIREST api call for Guest userMagento 2 Custom Web Api callMagento 2 call external REST apiSimple Magento 2 rest API?Use Magento 2 Web API to pull product dataHow to overwrite customer registration REST API in magento 2.3Magento 2.3 Custom Rest Api get size limit






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








0















I created a Magento 2.0 module and it calls an external web service with the command Zend_XmlRpc_Client.



/* REST */
$client = new Zend_XmlRpc_Client($this->_scopeConfig->getValue('akria_store/store_view/domain_configurateur').'/api/xmlrpc/');
$session = $client->call('login', array($this->_scopeConfig->getValue('akria_store/soap/user'), $this->_scopeConfig->getValue('akria_store/soap/password')));
$result = $client->call('call', array ($session, 'configurateur_api.setprojectstate' ,array(array('order_id'=>$order_id,'state' => AkriaConfigurateurModelProject::PENDING,'project' => $item->getData('configurateur_project_id')))));


But this function no longer exists.



How can I now call an external web service without using curl? replacement function of Zend_XmlRpc_Client.



thank you in advance.










share|improve this question
































    0















    I created a Magento 2.0 module and it calls an external web service with the command Zend_XmlRpc_Client.



    /* REST */
    $client = new Zend_XmlRpc_Client($this->_scopeConfig->getValue('akria_store/store_view/domain_configurateur').'/api/xmlrpc/');
    $session = $client->call('login', array($this->_scopeConfig->getValue('akria_store/soap/user'), $this->_scopeConfig->getValue('akria_store/soap/password')));
    $result = $client->call('call', array ($session, 'configurateur_api.setprojectstate' ,array(array('order_id'=>$order_id,'state' => AkriaConfigurateurModelProject::PENDING,'project' => $item->getData('configurateur_project_id')))));


    But this function no longer exists.



    How can I now call an external web service without using curl? replacement function of Zend_XmlRpc_Client.



    thank you in advance.










    share|improve this question




























      0












      0








      0








      I created a Magento 2.0 module and it calls an external web service with the command Zend_XmlRpc_Client.



      /* REST */
      $client = new Zend_XmlRpc_Client($this->_scopeConfig->getValue('akria_store/store_view/domain_configurateur').'/api/xmlrpc/');
      $session = $client->call('login', array($this->_scopeConfig->getValue('akria_store/soap/user'), $this->_scopeConfig->getValue('akria_store/soap/password')));
      $result = $client->call('call', array ($session, 'configurateur_api.setprojectstate' ,array(array('order_id'=>$order_id,'state' => AkriaConfigurateurModelProject::PENDING,'project' => $item->getData('configurateur_project_id')))));


      But this function no longer exists.



      How can I now call an external web service without using curl? replacement function of Zend_XmlRpc_Client.



      thank you in advance.










      share|improve this question
















      I created a Magento 2.0 module and it calls an external web service with the command Zend_XmlRpc_Client.



      /* REST */
      $client = new Zend_XmlRpc_Client($this->_scopeConfig->getValue('akria_store/store_view/domain_configurateur').'/api/xmlrpc/');
      $session = $client->call('login', array($this->_scopeConfig->getValue('akria_store/soap/user'), $this->_scopeConfig->getValue('akria_store/soap/password')));
      $result = $client->call('call', array ($session, 'configurateur_api.setprojectstate' ,array(array('order_id'=>$order_id,'state' => AkriaConfigurateurModelProject::PENDING,'project' => $item->getData('configurateur_project_id')))));


      But this function no longer exists.



      How can I now call an external web service without using curl? replacement function of Zend_XmlRpc_Client.



      thank you in advance.







      magento2.3 api rest






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 1 at 12:25









      Mohit Rane

      1,20718 bronze badges




      1,20718 bronze badges










      asked Aug 1 at 11:41









      S8NS8N

      1




      1























          1 Answer
          1






          active

          oldest

          votes


















          0














          SOAP:



          use MagentoFrameworkWebapiSoapClient



           public function __construct(
          MagentoFrameworkWebapiSoapClientFactory $soap
          )
          $this->soap = $soap;



          and in function



          public function makeRequest() 
          $opts = [
          'http' => [
          'user_agent' => 'PHPSoapClient'
          ]
          ];
          $context = stream_context_create($opts);
          $url = 'http://someurl.com';
          $soapClientOptions = [
          'stream_context' => $context,
          'cache_wsdl' => 0
          ];
          $client = $this->soap->create($url, $soapClientOptions);
          $content = ['test' => '123'];
          $result = $client->functionFromApi($options);



          Curl:



          Use MagentoFrameworkHTTPClientCurl class.



          There are some functions for set headers, credentials, body etc.



          To make request just create object:



          public function construct(
          Curl $curl,
          )
          $this->curl = $curl;



          and in function



          public function makeRequest() 
          $url = 'http://someurl.com';
          $content = ['test' => '123'];

          //to make post request
          $this->curl->post($url, $content);

          //to make get request
          $this->curl->get($url, $content);

          //to get response from request
          $response = $this->curl->getBody();






          share|improve this answer






















          • 1





            Thx, use curl I find it very ugly so I'm going to use SOAP

            – S8N
            Aug 2 at 7:57













          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%2f284084%2fmagento-2-3-call-api-rest-extern%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














          SOAP:



          use MagentoFrameworkWebapiSoapClient



           public function __construct(
          MagentoFrameworkWebapiSoapClientFactory $soap
          )
          $this->soap = $soap;



          and in function



          public function makeRequest() 
          $opts = [
          'http' => [
          'user_agent' => 'PHPSoapClient'
          ]
          ];
          $context = stream_context_create($opts);
          $url = 'http://someurl.com';
          $soapClientOptions = [
          'stream_context' => $context,
          'cache_wsdl' => 0
          ];
          $client = $this->soap->create($url, $soapClientOptions);
          $content = ['test' => '123'];
          $result = $client->functionFromApi($options);



          Curl:



          Use MagentoFrameworkHTTPClientCurl class.



          There are some functions for set headers, credentials, body etc.



          To make request just create object:



          public function construct(
          Curl $curl,
          )
          $this->curl = $curl;



          and in function



          public function makeRequest() 
          $url = 'http://someurl.com';
          $content = ['test' => '123'];

          //to make post request
          $this->curl->post($url, $content);

          //to make get request
          $this->curl->get($url, $content);

          //to get response from request
          $response = $this->curl->getBody();






          share|improve this answer






















          • 1





            Thx, use curl I find it very ugly so I'm going to use SOAP

            – S8N
            Aug 2 at 7:57















          0














          SOAP:



          use MagentoFrameworkWebapiSoapClient



           public function __construct(
          MagentoFrameworkWebapiSoapClientFactory $soap
          )
          $this->soap = $soap;



          and in function



          public function makeRequest() 
          $opts = [
          'http' => [
          'user_agent' => 'PHPSoapClient'
          ]
          ];
          $context = stream_context_create($opts);
          $url = 'http://someurl.com';
          $soapClientOptions = [
          'stream_context' => $context,
          'cache_wsdl' => 0
          ];
          $client = $this->soap->create($url, $soapClientOptions);
          $content = ['test' => '123'];
          $result = $client->functionFromApi($options);



          Curl:



          Use MagentoFrameworkHTTPClientCurl class.



          There are some functions for set headers, credentials, body etc.



          To make request just create object:



          public function construct(
          Curl $curl,
          )
          $this->curl = $curl;



          and in function



          public function makeRequest() 
          $url = 'http://someurl.com';
          $content = ['test' => '123'];

          //to make post request
          $this->curl->post($url, $content);

          //to make get request
          $this->curl->get($url, $content);

          //to get response from request
          $response = $this->curl->getBody();






          share|improve this answer






















          • 1





            Thx, use curl I find it very ugly so I'm going to use SOAP

            – S8N
            Aug 2 at 7:57













          0












          0








          0







          SOAP:



          use MagentoFrameworkWebapiSoapClient



           public function __construct(
          MagentoFrameworkWebapiSoapClientFactory $soap
          )
          $this->soap = $soap;



          and in function



          public function makeRequest() 
          $opts = [
          'http' => [
          'user_agent' => 'PHPSoapClient'
          ]
          ];
          $context = stream_context_create($opts);
          $url = 'http://someurl.com';
          $soapClientOptions = [
          'stream_context' => $context,
          'cache_wsdl' => 0
          ];
          $client = $this->soap->create($url, $soapClientOptions);
          $content = ['test' => '123'];
          $result = $client->functionFromApi($options);



          Curl:



          Use MagentoFrameworkHTTPClientCurl class.



          There are some functions for set headers, credentials, body etc.



          To make request just create object:



          public function construct(
          Curl $curl,
          )
          $this->curl = $curl;



          and in function



          public function makeRequest() 
          $url = 'http://someurl.com';
          $content = ['test' => '123'];

          //to make post request
          $this->curl->post($url, $content);

          //to make get request
          $this->curl->get($url, $content);

          //to get response from request
          $response = $this->curl->getBody();






          share|improve this answer















          SOAP:



          use MagentoFrameworkWebapiSoapClient



           public function __construct(
          MagentoFrameworkWebapiSoapClientFactory $soap
          )
          $this->soap = $soap;



          and in function



          public function makeRequest() 
          $opts = [
          'http' => [
          'user_agent' => 'PHPSoapClient'
          ]
          ];
          $context = stream_context_create($opts);
          $url = 'http://someurl.com';
          $soapClientOptions = [
          'stream_context' => $context,
          'cache_wsdl' => 0
          ];
          $client = $this->soap->create($url, $soapClientOptions);
          $content = ['test' => '123'];
          $result = $client->functionFromApi($options);



          Curl:



          Use MagentoFrameworkHTTPClientCurl class.



          There are some functions for set headers, credentials, body etc.



          To make request just create object:



          public function construct(
          Curl $curl,
          )
          $this->curl = $curl;



          and in function



          public function makeRequest() 
          $url = 'http://someurl.com';
          $content = ['test' => '123'];

          //to make post request
          $this->curl->post($url, $content);

          //to make get request
          $this->curl->get($url, $content);

          //to get response from request
          $response = $this->curl->getBody();







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 1 at 13:01

























          answered Aug 1 at 12:56









          lama377lama377

          162 bronze badges




          162 bronze badges










          • 1





            Thx, use curl I find it very ugly so I'm going to use SOAP

            – S8N
            Aug 2 at 7:57












          • 1





            Thx, use curl I find it very ugly so I'm going to use SOAP

            – S8N
            Aug 2 at 7:57







          1




          1





          Thx, use curl I find it very ugly so I'm going to use SOAP

          – S8N
          Aug 2 at 7:57





          Thx, use curl I find it very ugly so I'm going to use SOAP

          – S8N
          Aug 2 at 7:57

















          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%2f284084%2fmagento-2-3-call-api-rest-extern%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?