简体   繁体   English

SOAP-ERROR:在PHP 5.2.17中解析WSDL

[英]SOAP-ERROR: Parsing WSDL in PHP 5.2.17

I'm trying to write a payment gateway. 我正在尝试编写一个支付网关。
I'm getting this error: 我收到此错误:

SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://pgwstest.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl' : Start tag expected, '<' not found 

the code that is generating this is: 生成此代码是:

$mclient = new SoapClient('https://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw?wsdl',array('soap_version'=>SOAP_1_2,'trace'=>1));

My PHP version is 5.2.17 我的PHP版本是5.2.17

What is the problem? 问题是什么?

Thanks 谢谢

You've to create stream_context for Mellat Bank in SoapClient object and pass it as 2nd parameter of object I hope it will work fine 您必须在SoapClient对象中为Mellat Bank创建stream_context并将其作为对象的第二个参数传递,我希望它能正常工作

$stream_context = stream_context_create(
  [
     'ssl' => array(
       'verify_peer'       => false,
       'verify_peer_name'  => false
    )
  ]
);
$your_soap_service_url='https://bpm.shaparak.ir/pgwchannel/services/pgw?wsdl';
$soap = new SoapClient($your_soap_service_url,  ['stream_context' => $stream_context]);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM