Hi,
I am creating an extension for Magento 2 and I need to call third party data with the help of soapclient to show in my extension. I have been using soapclient in my Magent 1.x extension but getting problem in Magento 2.0 extension. This is the code I have been using in Magento 1.x extension.
$options = array('location' => "https://www.abc.com/soapserver.php", 'uri' => 'http://localhost/magento2/', 'login' => 'xxx', 'password' => 'xxx' ); $api = new SoapClient(NULL, $options); $result = $api->getMyContents();
But this code is not working in my Magento 2 extension. Am I forgetting to add some classes. Need help to make a soapclient request for a third party API.
I am thankful for help/suggestion.
Solved! Go to Solution.
Its working now, I just changed to
$api = new \Zend\Soap\Client(NULL, $options);
Thanks
What exactly error message you got?
Hi,
thanks for your reply. The page just goes blank instead or any error message.