我只是想用SHA2
和TLS1.2
發送SOAP請求發送到SOAP服務器,但它顯示試圖創建SOAP客戶端時,提示以下錯誤如何使用SHA2和TLS版本發送SOAP請求1.2
錯誤
SOAP-ERROR: Parsing WSDL: Couldn't load from ' https://example.com/wsdl ' : failed to load external entity " https://example.com/wsdl "
代碼
$url = 'https://example.com/wsdl';
$client = new SoapClient(
$url,
array(
'ssl_method' => SOAP_SSL_METHOD_TLS,
'cache_wsdl' => WSDL_CACHE_NONE,
'stream_context'=> stream_context_create(
array(
'ssl'=> array(
'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT,
'ciphers' => 'SHA2',
'verify_peer'=>false,
'verify_peer_name'=>false,
'allow_self_signed' => true //can fiddle with this one.
)
)
)
)
);
我想使用'TLS1.2'而不是'SSL' –