android soapfault 服务器无法处理请求,解决SoapFault异常:[HTTP]无法解析URL(resolve SoapFault exception: [HTTP] Unable t...

在PHP中尝试调用SOAP Web服务时遇到错误,`TPGetLocalisationVersion` 方法执行失败,但该方法的参数正确,且智能手机应用可以正常访问。错误信息显示无法解析URL。已确认WSDL文件未被缓存且在线工具检测WSDL文件无误。问题可能在于PHP的配置或服务器设置。寻求解决方案。
摘要由CSDN通过智能技术生成

I work on a projet which use a Soap based webservice queried by PHP and 2 native smartphone apps (ios and android) , after some edits made by the webservice development team, things were broken on PHP side but no problems from smartphone apps.

here is a simple script to reproduce the problem

error_reporting(E_ALL);

$url = 'http://www.xxxxx.com/service.awws?wsdl';

$sKey = 'thekey';

$client= new SoapClient($url, array('trace' => 1,

'exception' => 1,

'encoding' => 'UTF-8',

'cache_wsdl' => WSDL_CACHE_NONE));

$params = array('sKey' => $sKey, 'nLangID' => 1);

$res = $client->TPGetLocalisationVersion($params);

echo '

Res : ';

print_r($res);

echo '

';

?>

I get the following error:

Fatal error: Uncaught SoapFault exception:

[HTTP] Unable to parse URL in /home/xxxx/www/test.php:14 Stack trace: #0 [internal function]:

SoapClient->__doRequest('__call('TPGetLocalisati...', Array) #2 /home/tmpweb/www/test.php(14):

SoapClient->TPGetLocalisationVersion(Array) #3 {main} thrown in /home/xxxx/www/test.php on line 14

the method TPGetLocalisationVersion exists and the parameters are correct. this code used to work some days ago.

I can also fetch the wsdl from the PHP Webserver using wget.

I tested the WSDL file with some online tool and it seems ok.

Any suggestions to debug this? I m sure the WSDL is not cached as I m on a dedicated server and completly disabled WSDL cache in php.ini

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值