How can I check whether the server is able to handle SOAP requests at run time ? I need to verify it before my script is executing.
You can use the phpinfo script to see is SOAP is installed.
To make SOAP requests to the SOAP API endpoint, use the "Content-Type: application/soap+xml" request header, which tells the server that the request body contains a SOAP envelope.
A PHP SOAP Extension can be used to provide and consume Web services. In other words, this PHP extension can be used by PHP developers to write their own Web Services, as well as to write clients to make use of the existing Web services.
You can use:
if (extension_loaded('soap')) { // Do things }
http://php.net/manual/en/function.extension-loaded.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With