【问题标题】:PHP - SOAP Client Unable to Call HTTPS EndpointPHP - SOAP 客户端无法调用 HTTPS 端点
【发布时间】:2016-06-03 12:22:10
【问题描述】:

我有一个问题,我无法从其他服务器调用 web 服务,它显示如下错误:

获取 http 标头时出错

当我查看更详细的错误时,我意识到 端点 不正确。例如,我在我的php代码中写了这个

$client=new SoapClient('https://www.example.com:17819/wsdl/sample.php?wsdl', array("trace" => 1, "connection_timeout" => 5, "exceptions" => 1));

endpoint应该在https,但是报错显示endpoint以http开头 --> http://www.example.com:17819/ wsdl/sample.php?wsdl

我的 php 客户端代码中缺少什么?

谢谢

【问题讨论】:

标签: php web-services soap https wsdl


【解决方案1】:

我刚刚解决了这个问题。 我使用nusoap_client 来解决这个问题。 我也改变了请求格式,像这样

$msg = "<soapenv:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:urn='urn:sj_service'>";

等等..

谢谢

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-02-09
    • 2016-06-20
    • 2016-02-21
    • 1970-01-01
    • 2011-03-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多