所以,我有以下问题:
我正在使用插件CakeSoap从SAP获取数据。
如果我使用我的内部链接(内部)测试它是否正常工作,但如果我尝试使用外部链接,我会发现以下错误:
"Failed to open stream: Could not connect because the target computer denied the connection." and "I/O warning : failed to load external entity "http://..."
此外,如果我尝试直接从浏览器加载此链接,它正在运行。
我已经阅读了StackOverflow和我的选项参数" trace"中的所有线程。设置为" true"
这是我的连接示例
private function getDataSAP($SAPcustomerID, $SAPdestinationIDS){
$soap = new CakeSoap([
'wsdl' => Configure::read('SAP_WSDL_CUSTOMER'),
'login' => Configure::read('SAP_USERNAME'),
'password' => Configure::read('SAP_PASS'),
'location' => Configure::read('SAP_WS_CUSTOMER'),
]);
//Collect all products from specific user and his destinations
$all_data = [];
foreach($SAPdestinationIDS as $data){
$all_data[] = $soap->sendRequest('ZGetCustomerData', [
'ZGetCustomerData' => [
'ICustomer' => $SAPcustomerID->customer_number,
'ItLocation' => [
'item' => [
'Servloc' => $data->destination_number
]
]
],
]
);
}
$all_destinations = [];
foreach($all_data as $my_containers){
$all_destinations[] = json_decode(json_encode($my_containers->EtLocation->item), true);
}
return $all_destinations;
}
我的CakeSoap.php文件中有一些选项
$options = [
// 'trace' => Configure::read('debug'),
'trace' => true,
'stream_context' => $context,
'cache_wsdl' => WSDL_CACHE_NONE
];
另外,我试图使用SoapUI软件提出请求并且它正在运行。
所以我的问题是为什么这个链接在php中不起作用?
感谢您的帮助!