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;
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
add a comment |
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
add a comment |
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
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
magento2.3 api rest
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
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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();
1
Thx, use curl I find it very ugly so I'm going to use SOAP
– S8N
Aug 2 at 7:57
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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();
1
Thx, use curl I find it very ugly so I'm going to use SOAP
– S8N
Aug 2 at 7:57
add a comment |
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();
1
Thx, use curl I find it very ugly so I'm going to use SOAP
– S8N
Aug 2 at 7:57
add a comment |
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();
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();
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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