SOAP WSDL 错误
我正在尝试在 php 中调用 web 服务。使用 php 5.3.0 它工作正常,但它必须使用 5.2.0
现在,当我执行 web 服务时,我收到此错误: [WSDL] SOAP 错误:正在解析 WSDL:无法从 https 加载: //xx.xx.xx.xx:port/webdialer/services/WebdialerSoapService?wsdl'
我已经在网上搜索过了,我发现这可能是一个错误。我按照他们的建议做了,但仍然行不通。
这是我的代码:
function MakeCall($linenumber, $destinationNumber, $deviceName){
/*try {
if(!@file_get_contents($wsdl)) {
throw new SoapFault('Server', 'No WSDL found at ' . $wsdl);
}*/
try{
$soap = new SoapClient("https://xx.xx.xx.xx:port/webdialer/services/WebdialerSoapService?wsdl",array(
"uri" => "urn:WebdialerSoap",
"trace" => 1,
"exceptions" => 1));
$rs2 = $soap->makeCallSoap(
array(
"userID"=>'xx',
"password"=>'xx'
),
$destinationNumber, // Destination number to be called
array(
'user'=>'user',
'deviceName'=>$deviceName,
'lineNumber'=>$linenumber,
'supportEM'=>false,
'locale'=>'English',
'dontAutoClose'=>true,
'dontShowCallConf'=>true
)
);
return $rs2;
} catch(SoapFault $e) {
echo $e;
}
}
我做错了什么?
I'm trying to call a webservice in php. With php 5.3.0 it works fine but it must work with 5.2.0
Now i'm getting this error when I execute my webservice:
[WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from https://xx.xx.xx.xx:port/webdialer/services/WebdialerSoapService?wsdl'
I've searched the net allready, and I found that it could be a bug. I did what they suggested but it stille won't work.
This is my code:
function MakeCall($linenumber, $destinationNumber, $deviceName){
/*try {
if(!@file_get_contents($wsdl)) {
throw new SoapFault('Server', 'No WSDL found at ' . $wsdl);
}*/
try{
$soap = new SoapClient("https://xx.xx.xx.xx:port/webdialer/services/WebdialerSoapService?wsdl",array(
"uri" => "urn:WebdialerSoap",
"trace" => 1,
"exceptions" => 1));
$rs2 = $soap->makeCallSoap(
array(
"userID"=>'xx',
"password"=>'xx'
),
$destinationNumber, // Destination number to be called
array(
'user'=>'user',
'deviceName'=>$deviceName,
'lineNumber'=>$linenumber,
'supportEM'=>false,
'locale'=>'English',
'dontAutoClose'=>true,
'dontShowCallConf'=>true
)
);
return $rs2;
} catch(SoapFault $e) {
echo $e;
}
}
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否在 php.ini 中为 5.2.0 安装启用了 openssl?
Do you have openssl enabled in php.ini for the 5.2.0 installation?