Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Getting error while using mageto soap api
 
Praveen Kumar Reddy
Jr. Member
 
Total Posts:  7
Joined:  2009-01-06
 

Hi,

I m using below code to access the mageto api

$proxy = new SoapClient(’http://localhost/magento/api/?wsdl’);
$sessionId = $proxy->login(’praveenkumar_reddy’, ‘infy@123’);
var_dump($proxy->call($sessionId, ‘customer.list’));
// Create new customer
$newCustomer = array(
‘firstname’ => ‘First’,
‘lastname’ => ‘Last’,
‘email’ => ‘test@example.com’,
‘password_hash’ => md5(’password’),
‘store_id’ => 0,
‘website_id’ => 0
);
$newCustomerId = $proxy->call($sessionId, ‘customer.create’, array($newCustomer));

But i am getting the error as below

Warning: SoapClient::SoapClient() [soapclient.soapclient]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\magento\rtd_integration\webservicecall.php on line 6

Warning: SoapClient::SoapClient(http://schemas.xmlsoap.org/soap/encoding/) [soapclient.soapclient]: failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\magento\rtd_integration\webservicecall.php on line 6

Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity “http://schemas.xmlsoap.org/soap/encoding/” in C:\xampp\htdocs\magento\rtd_integration\webservicecall.php on line 6
Soap Fault Reason: Soap Fault Code:

Highly appreciated if any one help me in this regard.

Thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageParts
Guru
 
Avatar
Total Posts:  415
Joined:  2007-11-18
 

Not sure mate, but it could be a DNS problem. There seems to be a bug causing this issue in PHP version 4.3.4. You can read more about this on the following links, or just google php_network_getaddresses.

http://www.webmasterworld.com/forum88/8829.htm
http://bugs.php.net/bug.php?id=11058
http://www.frihost.com/forums/vt-88227.html

Hope that helps you smile

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top