I am using SMS to receive and enter data into my database. After successful 
processing of the data, I send an acknowledgment of receipt of the data sent to 
the recipient. My problem is that the acknowledgment is not being received by 
the simulator even though the data sent through it is properly registered in 
the database. 

Interestingly, this same code worked perfectly when I was using Coldfusion MX7 
but is refusing to work in Coldfusion 8. 


What is wrong? TIA

Here is a working part of the code that is not working:

<cfcomponent displayname="SMS Voting Listener" hint="Process SMS messages.">
<cffunction name="onIncomingMessage" output="no">
   <cfargument name="CFEvent" type="struct" required="yes" />

<!--- Get voting data and sender number--->
<cfset voteResults=arguments.CFEvent.data.message />
<cfset agentNumber=arguments.CFEvent.originatorID />

<!--- Set up return struct with needed arguments--->
<cfset retValue=structNew() />
<cfset retValue.command="submit" />
<cfset retValue.sourceAddress=arguments.CFEvent.gatewayid />
<cfset retValue.destAddress=agentNumber />

<!--- Break the vote string sent into its individual components using the 
function ListToArray()  --->
<cfset resultsArray=ListToArray("#voteResults#"," ")>


<!--- Separate and add voting information to database  --->
<cfswitch expression="#resultsArray[1]#">

..
..
..
        
        <!--- Begin processing for updating authorized polling agent list --->  
    <cfcase value="R">
                
                <cftransaction>
<!--- update Agent table with agents name and mobile phone number --->
        <cfquery datasource="#request.datasource#">
                
            INSERT INTO Agent(AgentPhoneNo, NameOfAgent)
                        VALUES('#agentNumber#', '#resultsArray[4]#')
                        
        </cfquery>
 
  <!--- update polling station information with agents mobile phone number --->
        <cfquery datasource="#request.datasource#">
                
            UPDATE PollingStation
                        SET AgentPhoneNo = '#agentNumber#'
                        Where StationNo = #val(resultsArray[2])# AND 
ConstituencyNo = #val(resultsArray[3])#
                        
        </cfquery> 
                
                        
</cftransaction>
<!--- end of processing for a updating polling agent information --->

<!--- Acknowledge reciept of polling agent information--->
        <cfset retValue.shortMessage="Thank you , your name and phone number 
has been registered" />
                        
    </cfcase>
 <cfdefaultcase>
        <cfset retValue.shortMessage="Please resend results with the proper 
format"/>
    </cfdefaultcase>
</cfswitch>

<!--- Send the return struct to gateway --->
<cfreturn retValue />
</cffunction>
</cfcomponent> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313188
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to