Ignore:
Timestamp:
Nov 11, 2014 9:40:48 PM (11 years ago)
Author:
dungnv
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/services/controllers/viettel.php

    r460 r470  
    99class Viettel extends MX_Controller
    1010{
    11        
    1211        function __construct() {
    1312                parent::__construct ();
     13               
    1414                $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';               
    1718                $this->nusoap_server->methodreturnisliteral=TRUE;
    1819               
     
    4849                                                'info' => 'xsd:string',
    4950                                                '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");
    5353        }
    5454
    55         function index() {
    56                 if($this->uri->segment(3) == "wsdl") {
     55        public function index ()
     56        {
     57                if($this->uri->segment(4) == "wsdl") {
    5758                        $_SERVER['QUERY_STRING'] = "wsdl";
    5859                } else {
    5960                        $_SERVER['QUERY_STRING'] = "";
    6061                }
    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"));
    6863        }
    6964       
    7065        public function mo()
    71         {
     66        {       
    7267                function MOReceiver($username, $password, $requestID, $userID, $receiverID, $serviceID, $commandCode, $contentType ,$info, $receiveTime){
    7368                        $msgType = '0'; //text message
     
    9590                       
    9691                        $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                                       
    10293                        $aryResult = explode ('|', $result);
    10394                       
Note: See TracChangeset for help on using the changeset viewer.