php - SOAP-ERROR:解析 WSDL:无法从 'HTTPS 加载 不使用 https
问题描述
我必须使用SOAP
将日期转移到我们的ERP
系统中。问题是当我使用http
wsdl
一切正常但如果我将链接更改为https
然后我有一个错误:
SOAP-ERROR: Parsing WSDL: Couldn't load from 'HTTPS...
我真的不明白这一点,因为在网络服务器上我可以绑定两个地址http
或https
. 而且我可以在网络浏览器中打开,没有任何问题。我需要在我的代码中添加一些额外的东西来允许https
吗?
我目前的要求(标准):
$UserID = 'domain\username';
$Pwd = "password";
$ns = 'HTTP://URL/file.svc?wsdl';
if (!defined('USERPWD')){define('USERPWD', $UserID.':'.$Pwd);};
// we unregister the current HTTP wrapper
stream_wrapper_unregister('http');
// we register the new HTTP wrapper
stream_wrapper_register('http', 'NTLMStream') or die("Failed to register protocol");
$options['trace'] = 1;
$options['soap_version'] = SOAP_1_1;
$options['compression'] = SOAP_COMPRESSION_ACCEPT;
try
{
// Initialize Soap Client
$client = new NTLMSoapClient($ns,$options);
$client->setUSERPWD(USERPWD);
这是工作时的示例,但是一旦我将 url 更改为https
然后一切都会停止。
解决方案
推荐阅读
- ssl - .NET CORE 5、VUE 2x、Docker、JWT 总是返回 401
- typescript - 如何在 Typescript 中转换字符串数组
- magento2 - 如何在流程创建订单的管理面板中添加按钮
- java - 在 Java 中设置泛型变量值
- postgresql - AWS RDS SSL - 每个 RDS 实例的 ssl 服务器证书是否不同或相同?
- angular - 入口控制器注释以支持多个 cors 来源
- r - 从网站以纯文本/文本格式下载 CSV
- c - 如何在字符串数组的特定位置添加双引号?
- flutter - 找不到盒子。您是否忘记调用 Hive.openBox()?- 即使我打开了它也没有检测到盒子
- javascript - React 继承 HTML 元素道具