简体   繁体   English

想要使用PHP Soap客户端连接到https主机

[英]Want to connecting to https host with PHP soap client

I wrote a php library which call to a wsdl in http. 我写了一个PHP库,该库在http中调用了wsdl。

Now i want to do the same things via https/ssl protocol. 现在我想通过https / ssl协议做同样的事情。

So i changed the wsdl path but is not sufficient. 所以我改变了wsdl路径,但还不够。

Here the code: 这里的代码:

    <?php
    $options = array(
                            'trace' => 1,
                            'exceptions' => 0,
                            'login'         => $login,
                            'password'      => $password
    );
    $wsdl= "https://toto.com/tata/ws/tutu?wsdl";

    $service = new SoapClient($wsdl,$options); 
    ?>

In the server, i received the hit correctly but over http, not https: 在服务器中,我正确地收到了点击,但是通过http而非https:

For your information, i have openssl enabled: 供您参考,我已启用openssl:

openssl
OpenSSL support     enabled
OpenSSL Library Version     OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
OpenSSL Header Version  OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 

Have you an explaination about that? 您对此有解释吗?

Thanks. 谢谢。

The WSDL file does contain the URLs to use for a service call. WSDL文件确实包含用于服务调用的URL。 Is this changed to HTTPS as well? 这也更改为HTTPS吗? If not, you'd only see the request for the WSDL using HTTPS (and PHP has a cache for it, so it won't occur every time if not disabled). 如果没有,您将只看到使用HTTPS的WSDL请求(并且PHP具有它的缓存,因此,如果未禁用,它不会每次都出现)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM