<?php // This example shows you how to simply forward all requests to another target // URI. This requires CURL access in PHP. This may be the better solution if // you simply want to forward your requests. One disadvantage is that nothing // will be cached. // Load the webservice class and run the forwarder service require_once 'class.phpwsdlajax.php'; // This PHP script will load the PhpWsdl framework, if it's not loaded already PhpWsdlAjax::RunForwarder('http://www.webservicex.net/geoipservice.asmx'); // The parameter is the endpoint URI of the target SOAP webservice
/** * Init PhpWsdlAjax */ public static function Init() { self::$CurlOptions = array(CURLOPT_POST => true, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => false, CURLOPT_HEADER => false, CURLOPT_RETURNTRANSFER => true); }
<?php // This example shows you how you can create a proxy SOAP webservice to use foreign locations // of SOAP webservies from an AJAX SOAP client. It requires the PhpWsdl framework files to be // in the same folder as this file is. // // I strongly recommend to enable the PhpWsdl cache when using this AJAX proxy! // Load the webservice class and run the service require_once 'class.phpwsdlajax.php'; // This PHP script will load the PhpWsdl framework, if it's not loaded already PhpWsdlAjax::RunProxy('http://www.webservicex.net/geoipservice.asmx?WSDL'); // The parameter is the WSDL URI of the target SOAP webservice // Note: The proxy can only handle simple SOAP webservices that only use the basic method and // complex types PhpWsdl supports! If your target webservice can't be run with this proxy, have // a look at demo2.php for another solution.