求解 PHP调用SoapClient报错
程序员文章站
2022-05-27 12:47:36
...
class Sign{ public $Uname; public $Password; public function __construct($u, $p) { $this->Uname = $u; $this->Password = $p; }}$auth['Uname'] = 'TestSupplierId';$auth['Password'] = 'TestSupplierSign';$login = new Sign($auth['Uname'], $auth['Password']);$method = 'GetOrder';$cmdid = 'http://sws2.vjia.com/swsmsTest/GetOrderService.asmx';$param['swsSupplierID'] = 'Test';try{$client = new SoapClient($cmdid, array('trace'=>true, 'exceptions'=>true, 'style'=>SOAP_DOCUMENT, 'encoding'=>'UTF-8', 'soap_version'=>SOAP_1_1));$header = new SoapHeader('http://tempuri.org/', 'MySoapHeader', $login, true, SOAP_ACTOR_NEXT);$client->__setSoapHeaders($header);$result = $client->__soapCall($method, array($param));}catch(SoapFault $e){exit($e->faultstring);}exit;
求高人指导
回复讨论(解决方案)
Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://sws2.vjia.com/swsmsTest/GetOrderService.asmx' : Premature end of data in tag html line 3 in E:\wwwroot\os5\diaoyong.php on line 20错误提示
我也遇到这个问题了。
推荐阅读
-
php用windows COM组件调用openoffice接口实现word转pdf文件时报错的解决办法
-
PHP调用MYSQL存储过程 不报错的解决方法
-
PHP调用pytnon程序有关问题,求解答
-
php调用webservice接口,乱码及报错的问题
-
PHP调用快递API接口报错了,该如何解决
-
php类成员方法中定义函数,递归调用报错????!!!
-
PHP调用pytnon程序问题,急求解答
-
PHP调用pytnon程序有关问题,求解答
-
php5.3 - 安装的wecenter 问答系统, 现在升级PHP 到5.3版本就报错了,求解 什么原因 很急 在线等。
-
php通过JavaBridge调用Java类库和不带包的自定义java类成功 但是调用带包的自定义Java类报错,该怎么解决,求大神指点,多谢