|
@@ -21,7 +21,16 @@ class Index extends BaseController
|
|
|
public function getReport()
|
|
|
{
|
|
|
use_soap_error_handler(false);
|
|
|
- $client = new \SoapClient('http://112.103.134.89:10020/server.php?wsdl'); //请求的ip localhost:8085为本机测试
|
|
|
+ $opts = array(
|
|
|
+ 'http' => array(
|
|
|
+ 'user_agent' => 'PHPSoapClient'
|
|
|
+ ),
|
|
|
+ 'ssl' => array(
|
|
|
+ 'verify_peer' => 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为本机测试
|
|
|
$data = [
|
|
|
'Barcode'=>'12203310010001'
|
|
|
]; //请求参数
|