/
Web Service - sendDocument

Web Service - sendDocument

Send Document

This provides the capability to send advanced SMS messages. The Document structure provides a powerful but complex interface. Multiple messages can be submitted in a single document.  Each message can be addresses to one or more recipients. A reply address can be set for each individual message destination. 8-Bit or binary SMS is supported enabling ringtone, logos & picture messages to be sent.  Messages can be individually scheduled and also be given an expiry time.

method

parameters

return

sendDocument

(Document document);

String documentId

Document, Message & Destination Options include: (default values in bold).

scheduled-time

YYYY/MM/DD HH:MM:SS

 

expiry-time

YYYY/MM/DD HH:MM:SS

duration of message validity eg 2 hours 0000/00/00 02:00:00

priority

0 = no priority; 1 = priority delivery

 

confirm

Address for confirmations to be sent

Only used by Document

reply-with-body

TRUE | FALSE

 

header

Source MS-ISDN

note: if the destination from address is set then this will
override the address set in the header tag.

footer

Appended to each message

 

replyto

Address for replies to be sent

Can be a URL (prefixed with http(smile)
or EMAIL (prefixed with mailto:)
or a INBOX (prefixed with inbox(smile)

  • Destination options take precedence over Message options which in turn take precedence over Document options.
  • Addresses will be serialised into Strings
  • A unique documentId will be generated by MessageCore.

Document

Class Document{
    String username;
    String password;

    Message[] message;
    Option[]  option;
}

Message

Class Message{
    String        subject;
    Destination[] destination;
    String        referenceId;
    Body          body;
    Option[]      option;
}

Destination

Class Destination{
    Address   destinationAddress;
    Address   fromAddress;
    String    referenceId;
    Option[]  option;
}

Address fromAddress sets the from MSISDN or Aplha string and overides any value set for this in the SMSOptions: Header tag

Address

Class Address{
    String type;
    String value;
}

Type: EMAIL | SMS | URL | WEBSERVICE

Note: Type is automatically determined when Value is set to one of the following:

PROTOCOL

TYPE

EXAMPLE

mailto:

EMAIL

xxx@yyy.com

http:

URL

http://www.xyz.com

https:

URL

https://www.xyz.com

ftp:

URL

ftp://<username>:<password>@ftp.xyz.com

webservice:

WEBSERVICE

webservice:http://services.xyz.com

Body

Class Body{
    String     type;
    Payload[]  payload;
}

Type: TEXT | RINGTONE | LOGO | PICTURE

Payload

Class Payload{
    String   type;
    String   encoding;
    String   content;
    Option[] option;
}

Attribute

Description

type

TEXT | IMELODY | MOTOROLA | OTT | RTTTL | GIF | BITMAP

encoding

ASCII | BASE64 | HEX | UTF-16

content

This is the content in ASCII, base64, hex or unicode

Payload Options include:

width

Number of pixels

height

Number of pixels

depth

Number of bits

mcc

Country Code

mnc

Carrier Code

Option

Class Option{
    String  name;
    String  value;
}