如何使用soap服务在magento服务器中创建会话id 我正在用Objject C++编写iOS项目。 我在这个功能上有问题

如何使用soap服务在magento服务器中创建会话id 我正在用Objject C++编写iOS项目。 我在这个功能上有问题,ios,magento,Ios,Magento,如何使用soap web服务为magento服务器创建会话id 提前感谢。试试这个: 您需要从magento后端设置apiUser和apiKey。完成后,使用它,您将获得会话字符串 $client = new SoapClient('http://yourmagentositeurl.com/soap/api/?wsdl'); // If somestuff requires api authentification, // then get a session token $session

如何使用soap web服务为magento服务器创建会话id

提前感谢。

试试这个: 您需要从magento后端设置apiUser和apiKey。完成后,使用它,您将获得会话字符串

$client = new SoapClient('http://yourmagentositeurl.com/soap/api/?wsdl');

// If somestuff requires api authentification,
// then get a session token
$session = $client->login('apiUser', 'apiKey');

$result = $client->call($session, 'somestuff.method');
// If you don't need the session anymore
$client->endSession($session);