SOAP WSDL 错误

发布于 2024-10-06 07:19:17 字数 1227 浏览 0 评论 0原文

我正在尝试在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深者入戏 2024-10-13 07:19:17

您是否在 php.ini 中为 5.2.0 安装启用了 openssl?

Do you have openssl enabled in php.ini for the 5.2.0 installation?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文