Vous êtes sur la page 1sur 4

The structure:

Web Server ----> GOIP Server ----> GOIP

Web server post an xml file to “GOIP server” then the server will schedule the sending message to

“GOIP”.

There are two functions we want to implement:

1) Sending Message

2) Requset Sending Message Status

1) Sending Message

The web server will post an xml file to GOIP Server:

<?xml version="1.0" encoding="UTF-8" ?>

<sms>

<uid>20080901-1212121</uid>

<senddate>2009-12-31</senddate>

<sendtime>15:00:00</sendtime>

<stopdate>2009-12-31</stoptime>

<stoptime>18:00:00</stoptime>

<goip>pccw</goip>

<msg>

<id>1</id>

<text>Hello World Message</text>

<rev>85294633701</rev>

</msg>

<msg>

<id>2</id>

<text>Hello World Message</text>

<rev>85294633701</rev>

</msg>

<msg>

<id>3</id>

<text>Hello World Message</text>

<rev>85294633701</rev>

</msg>
</sms>

Remark:

Element

uid This sms xml file uid.

senddate Start sending sms message date

sendtime Start sending sms message time

stopdate Stop sending sms message date

stoptime Stop sending sms message time

goip Define which service provider you want

to send this message.

id Unique id generate for web server

text Message content

rev Receiver phone number


2) Requset Sending Message Status

The web server will send a xml file with Sending Message uid, then the GOIP Server will response a xml

file

1) Request “GOIP Server”

<?xml version="1.0" encoding="UTF-8"?>

<uid>20080901-1212121</uid>

Remark:

Element Description

uid Unique id

2) Response from “GOIP Server”

<?xml version="1.0" encoding="UTF-8"?>

<response>

<status>1</status>

</response>

<msglst>

<msg>

<id>1</id>

<date>2009-12-31</date>

<time>15:00:40</time>

<status>Delivery</status>

</msg>

<msg>

<id>2</id>

<date>2009-12-31</date>

<time>15:00:40</time>

<status>Fail</status>

</msg>

</ msglst >

Remark:

Element Description

status 1 : Current sending

2 : Not have this uid

3 : Not yet send out

id Unique id generate for web server

date Sending date


time Sending time

status Delivery : Success send the message

Waiting : waiting for sending out

Fail : cannot send the message to

receiver