adam291086 Posted December 2, 2008 Share Posted December 2, 2008 I have php 5.2.6 all the php info can be found here http://adamplowman.com/soap/phpinfo.php. I am trying to run a simple script <?php $client = new SoapClient("http://gw1.aql.com/soap/sendservice.php?WSDL ", array('exceptions' => 0)); $result = $client->SoapSendSms(); if (is_soap_fault($result)) { trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faultstring})", E_USER_ERROR); } ?> and i get the error message Fatal error: Class 'SoapClient' not found in /home/adamplo1/public_html/soap/php_soap.php on line 2 i know its something to do with not having the right install enabled. But i am not sure which one i should have. Any ideas? Link to comment https://forums.phpfreaks.com/topic/135131-php-and-soap/ Share on other sites More sharing options...
Mark Baker Posted December 2, 2008 Share Posted December 2, 2008 Fatal error: Class 'SoapClient' not found in /home/adamplo1/public_html/soap/php_soap.php on line 2 i know its something to do with not having the right install enabled. But i am not sure which one i should have. Any ideas? Manual pages for Soap Installation Link to comment https://forums.phpfreaks.com/topic/135131-php-and-soap/#findComment-703855 Share on other sites More sharing options...
adam291086 Posted December 3, 2008 Author Share Posted December 3, 2008 ok i got the hosting comapny to enable soap. Now i am trying to send an sms message through aql's soap gateway. I am using this code <?php # GetTemp.php $client = new SoapClient('http://gw1.aql.com/soap/sendservice.php?WSDL'); $destination = '447845633257'; $originator = 'Adam'; $message = 'test'; $messagetype = 'text'; $maxconcat = '2'; $sendtime =' 2005-10-10T17:00:00Z'; $callback = 'http://adamplowman.com/form/callback.php?reportcode=%code&destinationnumber=%dest&myreference=123'; $client = new SoapClient("http://gw1.aql.com/soap/sendservice.php?WSDL", array('username' => "username",'password'=> "password")); $client -> SoapSendSms($destination,$originator,$message,$messagetype,$maxconcat,$sendtime,$callback); ?> and i get the following error i dont understand Fatal error: Uncaught SoapFault exception: [sOAP:Client] Incorrectly formed SOAP Header. Please see wsdl file in /home/adamplo1/public_html/soap/php_soap.php:11 Stack trace: #0 [internal function]: SoapClient->__call('SoapSendSms', Array) #1 /home/adamplo1/public_html/soap/php_soap.php(11): SoapClient->SoapSendSms('447841633135', 'Adam', 'test', 'text', '2', ' 2005-10-10T17:...', 'http://adamplow...') #2 {main} thrown in /home/adamplo1/public_html/soap/php_soap.php on line 11 and ideas? Link to comment https://forums.phpfreaks.com/topic/135131-php-and-soap/#findComment-704799 Share on other sites More sharing options...
adam291086 Posted December 3, 2008 Author Share Posted December 3, 2008 i have solved one of the error and now getting SoapFault exception: [sOAP:Client] Incorrectly formed SOAP Header. Please see wsdl file in /home/adamplo1/public_html/soap/php_soap.php:15 Stack trace: #0 /home/adamplo1/public_html/soap/php_soap.php(15): SoapClient->__call('SoapSendSMS', Array) #1 {main} using the code <?php $client = new SoapClient('http://gw1.aql.com/soap/sendservice.php?WSDL'); $params["destinationarray"] = "447841633135"; $params["originator"] = 'Adam'; $params["message"] = 'test'; $params["messagetype"] = 'text'; $params["maxconcat"] = '2'; $params["sendtime"] =' 2005-10-10T17:00:00Z'; $params["callback"] = 'http://adamplowman.com/form/callback.php?reportcode=%code&destinationnumber=%dest&myreference=123'; $client = new SoapClient("http://gw1.aql.com/soap/sendservice.php?WSDL"); $client ->username = 'fdgdfgdfgdf'; $client ->password = 'fgdfgdfgdfg'; try { print($client->__call(SoapSendSMS,$params)); } catch (SoapFault $exception) { echo $exception; } ?> Link to comment https://forums.phpfreaks.com/topic/135131-php-and-soap/#findComment-704926 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.