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

          Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

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

          Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form