- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2016
08:16 AM
01-25-2016
08:16 AM
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.
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2016
11:00 PM
01-25-2016
11:00 PM
Its working now, I just changed to
$api = new \Zend\Soap\Client(NULL, $options);
Thanks
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2016
08:24 AM
01-25-2016
08:24 AM
Re: Magento 2 soapclient request
What exactly error message you got?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2016
10:49 PM
01-25-2016
10:49 PM
Re: Magento 2 soapclient request
Hi,
thanks for your reply. The page just goes blank instead or any error message.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2016
11:00 PM