Changeset 470 for pro-violet-viettel/sourcecode/application/modules/services/controllers/viettel.php
- Timestamp:
- Nov 11, 2014 9:40:48 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/services/controllers/viettel.php
r460 r470 9 9 class Viettel extends MX_Controller 10 10 { 11 12 11 function __construct() { 13 12 parent::__construct (); 13 14 14 $this->nusoap_server = new soap_server (); 15 $this->nusoap_server->configureWSDL('messageReceiver', 'urn:messageReceiver'); 16 $this->nusoap_server->soap_defencoding = 'UTF-8'; 15 $this->nusoap_server->configureWSDL('messageReceiverWSDL','urn:messageReceiverWSDL'); 16 17 $this->nusoap_server->soap_defencoding = 'UTF-8'; 17 18 $this->nusoap_server->methodreturnisliteral=TRUE; 18 19 … … 48 49 'info' => 'xsd:string', 49 50 'receiveTime' => 'xsd:string') 50 , array ('return' => 'xsd:string'),false,false 51 ,'rpc' 52 ); 51 , array ('return' => 'xsd:string'), 52 'urn:messageReceiverWSDL',"urn:messageReceiverWSDL#MOReceiver","rpc","encoded"); 53 53 } 54 54 55 function index() { 56 if($this->uri->segment(3) == "wsdl") { 55 public function index () 56 { 57 if($this->uri->segment(4) == "wsdl") { 57 58 $_SERVER['QUERY_STRING'] = "wsdl"; 58 59 } else { 59 60 $_SERVER['QUERY_STRING'] = ""; 60 61 } 61 62 function MOReceiver () { 63 return 'Service not available!'; 64 } 65 66 $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA:''; 67 $this->nusoap_server->service($HTTP_RAW_POST_DATA); 62 $this->nusoap_server->service(file_get_contents("php://input")); 68 63 } 69 64 70 65 public function mo() 71 { 66 { 72 67 function MOReceiver($username, $password, $requestID, $userID, $receiverID, $serviceID, $commandCode, $contentType ,$info, $receiveTime){ 73 68 $msgType = '0'; //text message … … 95 90 96 91 $result = $CI->userModel->register ($sentNumber, $receiverID, $serviceID, $commandCode, $info, $receiveTime, $status); 97 $aryAgrs = func_get_args (); 98 $fh = fopen('register.log', 'a+'); 99 fwrite ($fh, var_export($aryAgrs, true). "\n"); 100 fclose($fh); 101 92 102 93 $aryResult = explode ('|', $result); 103 94
Note: See TracChangeset
for help on using the changeset viewer.