|
@@ -20,17 +20,22 @@ class Index extends BaseController
|
|
|
}
|
|
|
public function getReport()
|
|
|
{
|
|
|
- use_soap_error_handler(false);
|
|
|
+
|
|
|
+ libxml_disable_entity_loader(false);
|
|
|
$opts = array(
|
|
|
- 'http' => array(
|
|
|
- 'user_agent' => 'PHPSoapClient'
|
|
|
- ),
|
|
|
'ssl' => array(
|
|
|
'verify_peer' => false
|
|
|
),
|
|
|
+ 'https' => array(
|
|
|
+ 'curl_verify_ssl_peer' => false,
|
|
|
+ 'curl_verify_ssl_host' => false
|
|
|
+ )
|
|
|
);
|
|
|
- $context = stream_context_create($opts);
|
|
|
- $client = new \SoapClient('http://112.103.134.89:10020/server.php?wsdl',array("trace" => 1, "cache_wsdl" => WSDL_CACHE_NONE, "exception" => 1, 'stream_context' => $context)); //请求的ip localhost:8085为本机测试
|
|
|
+ $streamContext = stream_context_create($opts);
|
|
|
+ $client = new SoapClient("http://112.103.134.89:10020/server.php?wsdl",
|
|
|
+ array(
|
|
|
+ 'stream_context' => $streamContext
|
|
|
+ ));
|
|
|
$data = [
|
|
|
'Barcode'=>'12203310010001'
|
|
|
]; //请求参数
|