SMSMessage is one of the types in the
PSWinCom SMS Gateway SOAP API. This object is used when submitting SMS messages to the Gateway.
Properties
The attributes supported are defined as follows:
Attribute | Description |
ReceiverNumber | Number of the receiver, internationally
formatted with country-code but no “+” or “00”
prefixed. |
SenderNumber | Number of sender to be displayed on receiver’s
handset. Numeric with no “+” or space, max 15
digits. Alphanumeric up to 11 characters can
also be used. |
Text | The SMS message body. Messages of up to 160
characters will be sent as one SMS. If the length
exceeds 160 characters, it will be sent as up to
16 SMS messages of each 134 characters that
are concatenated by the phone. The maximum
length is thus 16*134 = 2144 characters. The ISO-
8859-1 character set is used. |
Tariff | The amount (in local currency as cents/”ører”)
to charge the receiver. This feature requires an
CPA agreement. Should be set to 0 (zero) when
not used. |
Network | Optional. Used to indicate special routing of the
message. Should only be set upon request from
gateway-owner. |
TypeOfMessage | Optional. Set this property to send other types
of messages than just plain text messages.
Supported values are:
|
TimeToLive | Set this value to the number of minutes that the message should be valid before it expires if not delivered. Set to 0 to use the default value. |
CPATag | Optional. Used with CPA messages to indicate further details on the subscribers telephone bill what he/she has paid for. |
SessionData | Optional. A free text field that can be used to tag the session with customer specific data such as the application name, username, reference-id etc. The maximum length is 200 characters.
Leave empty unless required. |
DeliveryTime | Optional. String representing a date and time when the Gateway should try to deliver the message.
If this parameter is present the message will be considered to be a deferred message that will be queued for future delivery instead of immediately being forwarded to operator. The format is as follows:
YYYYMMDDHHmm
Sample:
20th of June 2008 at 14:32 should be specified
as: 200806201432
DeliveryTime is always in CET. Maximum delay of message is currently one week (7 days). |
ServiceCode | Must be specified for CPA Goods And Services transactions, but should not be set for other messages. | |
Code
C# notation of the SMSMessage object:
public class SMSMessage
{
public string ReceiverNumber;
public string SenderNumber;
public string Text;
public string Network;
public string TypeOfMessage;
public int Tariff;
public int TimeToLive;
public string CPATag;
public bool RequestReceipt;
public string SessionData;
public string AffiliateProgram;
public string DeliveryTime;
public string ServiceCode;
public SMSMessage()
{
}
}
XML
Sample XML:
<SMSMessage>
<ReceiverNumber>4792112233</ReceiverNumber>
<SenderNumber>2077</SenderNumber>
<Text>Test</Text>
<Network> </Network>
<TypeOfMessage> </TypeOfMessage>
<Tariff>0</Tariff>
<TimeToLive>0</TimeToLive>
<CPATag></CPATag>
<RequestReceipt>true</RequestReceipt>
<SessionData></SessionData>
<AffiliateProgram></AffiliateProgram>
<DeliveryTime></DeliveryTime>
<ServiceCode></ServiceCode>
</SMSMessage>
See also