- SOAP is built on the top HTTP. So, SSL should not be business of SOAP. In other words, SOAP client shall rely on the HTTP client implement.
- I THOUGHT that Zend_Soap_Client uses same native code as PHP http client.
However, I was wrong. He tested and found that he was able to do file_get_contents and retrieve https:// content from the server. Then, I started to trace the source code of Zend_Soap_Client. I found,
- Zend_Soap_Client is a wrapper around PHP SOAP extension.
- PHP SOAP is a thin layer. It quickly goes to native code at file called soap.php.
- Native c code of soap.php has its own logical to deal with proxy and SSL. Click Here to see C source code.
BTW, PHP 5.3 version of Zend Server 5.0.2 on iSeries does not support Zend_Soap_Client to access web service over the SSL. However, Zend_Soap_Client work with SSL when the Zend Server was rolled back to version 5.0.1 . Zend_Soap_Client coming with Zend server 5.0.4 can be used to access Web service over one-way SSL. I have not tried mutual SSL with Zend_Soap_Client yet. But, it sounds not easy.
Also, to test Zend_Soap_Client access over one-way SSL can be as simple as below,
try { $soap_url = 'https://your.host/webservice?wsdl'; $soap_client = new SoapClient ( $soap_url); var_dump ( $soap_client -> __getFunctions () ); } catch ( Exception $e ) { print_r ( $e ); exit (); }
No comments:
Post a Comment