ebaySOAP 示例示例给出错误 - 无法找到包装器“https”

Posted

技术标签:

【中文标题】ebaySOAP 示例示例给出错误 - 无法找到包装器“https”【英文标题】:ebaySOAP sample example gives error - unable to find the wrapper "https" 【发布时间】:2013-09-23 04:43:54 【问题描述】:

为什么我得到以下 错误

警告:SoapClient::__doRequest():找不到包装器“https” - 你是不是在配置php的时候忘记启用了

我的错误是什么?

我的代码如下

$config = parse_ini_file('ebay.ini', true);
$site = $config['settings']['site'];
$compatibilityLevel = $config['settings']['compatibilityLevel'];

$dev = $config[$site]['devId'];
$app = $config[$site]['appId'];
$cert = $config[$site]['cert'];
$token = $config[$site]['authToken'];
$location = $config[$site]['gatewaySOAP'];

// Create and configure session
$session = new eBaySession($dev, $app, $cert);
$session->token = $token;
$session->site = 203; // 0 = US;
$session->location = $location;

// Make an AddItem API call and print Listing Fee and ItemID
try 

    $client = new eBaySOAP($session);

    $PrimaryCategory = array('CategoryID' => 357);

    $Item = array('ListingType' => 'Chinese',
                  'Currency' => 'INR',
                  'Country' => 'US',
                  'PaymentMethods' => 'PaymentSeeDescription',
                  'RegionID' => 0,
                  'ListingDuration' => 'Days_3',
                  'Title' => 'The new item',
                  'Description' => "It's a great new item",
                  'Location' => "San Jose, CA",
                  'Quantity' => 1,
                  'StartPrice' => 24.99,
                  'PrimaryCategory' => $PrimaryCategory,
                 );

    $params = array('Version' => $compatibilityLevel, 'Item' => $Item);
    $results = $client->AddItem($params);

    // The $results->Fees['ListingFee'] syntax is a result of SOAP classmapping
    print "Listing fee is: " . $results->Fees['ListingFee'] . " <br> \n";

    print "Listed Item ID: " . $results->ItemID . " <br> \n";

    print "Item was listed for the user associated with the auth token code       herer>\n";`enter code here`

 catch (SOAPFault $f) 
    print $f; // error handling

提前致谢 壁画

【问题讨论】:

【参考方案1】:

您必须添加(或取消注释)extension=php_openssl.dll;到你的 php.ini 文件中。

【讨论】:

以上是关于ebaySOAP 示例示例给出错误 - 无法找到包装器“https”的主要内容,如果未能解决你的问题,请参考以下文章

由于打包失败造成项目无法启动,报错:找不到程序包

NumPy 包给出了一个 array() 错误如何解决这个问题? [关闭]

Angular 4 示例教程类型脚本错误

来自 SCIKIT 学习用户指南的 GridSearch 示例尝试给出错误

PyQt5在执行示例代码后给出错误代码[重复]

Kivy - 在 Windows 上创建包