我正在使用下面的代码来调用 magento 网络服务。这段代码上个月运行良好。但现在它给出了一个错误 - “缺少必需的参数”
try {
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
$proxy = new SoapClient('http://domain.com/api/v2_soap/?wsdl=1', array('trace' => 1, 'connection_timeout' => 120));
$session = $proxy->login(array(
'username' => "username",
'apiKey' => "apikey"
));
$sessionId = $session->result;
$filters = array(
'sku' => array('like'=>'zol%')
);
$products = $proxy->catalogProductList(array("sessionId" => $sessionId, "filters" => $filters));
echo '<h1>Result</h1>';
echo '<pre>';
var_dump($products);
echo '</pre>';
} catch (Exception $e) {
echo '<h1>Error</h1>';
echo '<p>' . $e->getMessage() . '</p>';
}