Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1307

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
Field
Contents
command
Must be
shortMessage
The message contents. Specify one of these fields, but not both. The SMPP specification imposes a maximum size
of 254 bytes on the
or
field can contain up to 64 K bytes; it must start with 0x0424, followed by 2 bytes specifying the payload length,
followed by the message contents.
messagePayload
destAddress
A ColdFusion array of destination addresses (required).
You cannot specify individual TON and NPI values for these addresses; all must conform to a single setting.
sourceAddress
The address of this application; you can omit this field if it is specified in the configuration file.
You can also set optional fields in the structure, such as a field that requests delivery receipts. For a complete list of
fields, see submitMulti command in the CFML Reference. For detailed descriptions of these fields, see the
documentation for the SUBMIT_MULTI PDU in the SMPP 3.4 specification, which you can download from the SMS
Forum at www.smsforum.net/.
Example: Using the submitMulti command in an onIncomingMessage method
The following example
onIncomingMessage
originator address, and sends a copy of the response to a second address. To test the example, run two instances of the
ColdFusion SMS client application. Use the default phone number of 5551212 for the first, and set the second one to
have a phone number of 555-1235. (Notice that the second phone number requires a hyphen (-).) Send a message from
the first simulator, and the response appears in both windows.
<cffunction name="onIncomingMessage" output="no">
<cfargument name="CFEvent" type="struct" required="yes">
<!--- Get the message. --->
<cfset data=CFEvent.DATA>
<cfset message="#data.message#">
<!--- Create the return structure. --->
<cfset retValue = structNew()>
<cfset retValue.command = "submitmulti">
<cfset retValue.sourceAddress = arguments.CFEVENT.gatewayid>
<cfset retValue.destAddresses=arraynew(1)>
<!--- One destination is incoming message originator;
get the address from CFEvent originator ID. --->
<cfset retValue.destAddresses[1] = arguments.CFEvent.originatorid>
<cfset retValue.destAddresses[2] = "555-1235">
<cfset retValue.shortMessage = "echo: " & message>
<cfreturn retValue>
</cffunction>
</cffunction>
The data command
To send binary data to a single destination address in an SMPP DATA_SM PDU, the Data parameter of a
function or the return variable of the CFC listener method must have the following fields:
SendGatewayMessage
Field
Contents
command
Must be
.
"submitMulti"
shortMessage
field, and some carriers could limit its size further. The
method sends a response that echoes an incoming message to the
.
"data"
Last updated 1/20/2012
1302
messagePayload

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents