嗨,對不起我的英文不好。帶密碼的SSL證書肥皂服務(PHP)
我需要訪問具有受密碼保護的證書的SOAP服務。我是新的PHP(在codeigniter 2中的PHP 5.4),並嘗試了一些不適合我的選項。
我有常量訪問:
const WSDL = 'https://sedeapl.dgt.gob.es:8080/WS_IEST_COMP/descargaArchivoMicrodatosService?wsdl';
const XMLNS = 'https://sedeapl.dgt.gob.es:8080/WS_IEST_COMP/descargaArchivoMicrodatosService';
const LOCAL_CERT_PASSWD = 'HERE I HAVE THE PASS OF THE CERT';
const LOCAL_CERT = './certificados/Certificados.p12';
private $client;
我已經試過這個選項:
選項A:
$this->client = new SoapClient(self::WSDL, array(
"trace" => 1,
"exceptions" => true,
"local_cert" => self::LOCAL_CERT,
"uri" => "urn:xmethods-delayed-quotes",
"style" => SOAP_RPC,
"use" => SOAP_ENCODED,
"soap_version" => SOAP_1_2 ,
"location" => self::XMLNS
)
);
選項B:
$this->$client = new SoapClient(self::WSDL, array('local_cert' => self::LOCAL_CERT));
我有不知道如何添加passw ORD。這些解決方案是我在這裏找到的stackoverflow。在兩個我都有同樣的錯誤:
SoapClient :: SoapClient():無法找到包裝「https」 - 你忘了配置PHP時啓用它?
我已經uncomented在php.ini
我有證書的那些路由嘗試了 「延長= php_openssl.dll」:
const LOCAL_CERT = 'certificados/Certificados.p12';
const LOCAL_CERT = 'Certificados.p12';
const LOCAL_CERT = './certificados/Certificados.p12';
任何有關於我能做些什麼的想法。非常感謝你!
什麼操作系統你使用? –