简体   繁体   中英

Consume wsHttpBinding with PHP Soap Client

is there a way to use wsHttpBinding with the PHP Soap Client? It did not work on my website on the first attempts. I had to change the connection to basicHttpBinding .

The main reason to do this is that (as I understand) the wsHttpBinding uses newer Soap Standards and has some kind of security implemented. Also the order of the response should be the same as the order of the requests.

Thanks in advance

basicHttpBinding use SOAP 1.1 and wsHttpBinding use SOAP 1.2

By default SoapClient use SOAP 1.1 but you can modify that.

$wsdl = "...url_to_your_wsdl...";
$client = new SoapClient($wsdl, array("soap_version" => SOAP_1_2));

http://php.net/manual/en/soapclient.soapclient.php

As far as I know PHP Soap Client does not support entire WS standard (WS-Security in particular). You should try to use some 3rd party frameworks like this:

http://wso2.com/products/web-services-framework/php/

Hope it helps,

If you configure WsHttpBinding to have no security or transport security then it should be possible. the desired soap will be simple and you can create it even by concatenating strings. otherwise I don't think php supports the newset security standards.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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