A Web Service Gateway for SMS- based Services

Transcript

A Web Service Gateway for SMS- based Services
A Web Service Gateway for SMSbased Services
Giuseppe Attardi, Daniele Picciaia,
Antonio Zoglio
Dipartimento di Informatica
Università di Pisa
Motivation
! bridge between telephony
applications and Web applications
! expose telephony services as XML
Web Services
Protocols
! Parlay X Web Services
! SMS Forum
– SMPP (Short Message Peer to Peer)
– MMAP (Mobile Message Access
Protocol)
! Vodafone service:
– MAM (Messaggistica Aziendale Mobile)
Network setting
GSM
Operator
Application
Servers
Message
Center
MAM
Protocol
SOAP
Private IP
connection
User
MAM Server
Parlay
SMS
Gateway
Clients
Software architecture
! XML Web Service
! WSDL
! SOAP
! Pattern subscribe/notify
Two-way Web Services
! Send Service:
– RequestIdentifier sendSms(destAddressSet,
senderName, charging, message)
! Notify Service:
– void notifySmsReception(RegistrationIdentifier,
smsServiceActivationNumber, SenderAddress,
message)
Web Service Architecture
Interactions:
XML
Communication:
Service
Broker
nd
Bi AP
SO
HTTP
Pu
bli
U D sh
DI
Data:
Service
Provider
SOAP
UDDI/WSDL
Find
Service
User
Web Services Protocols
Find a Service
http://www.uddi.org
Link to discovery document
UDDI
Discovery
Web
Service
Consumer
http://yourservice.com
HTML with link to WSDL
How do we talk? (WSDL)
http://yourservice.com/?WSDL
return service descriptions (XML)
Let me talk to you (SOAP)
http://yourservice.com/svc1
return service response (XML)
Web
Service
Interoperability
Application
Servers
MAM
Protocol
C++
Linux
HTML
any browser
SOAP
Parlay
SMS
Gateway
C#
Windows
gSOAP
!
!
!
C++ SOAP compiler
From WSDL to .h headers and stub/proxy
code
Utilities:
– wsdl2h (generates .h from WSDL)
– soapcpp2 (generates stub/skeleton from .h)
!
High performance:
– 1500 call/sec (gSOAP, C++)
– 370 req/sec (Apache Axis, Java)
WSDL
<message name="sendSmsRequest">
<part name="destAddressSet"
element="tns:destAddressSet"/>
<part name="senderName"
element="tns:senderName"/>
<part name="charging"
element="tns:charging"/>
<part name="message"
element="tns:message"/>
</message>
<message name="sendSmsResponse">
<part name="result"
element="tns:SmsIdentifier"/>
</message>
wsdl2h output
int sendSms(ArrayOfEndUserIdentifier*
destAddressSet,
string senderName,
string charging,
string message,
string& SmsIdentifier);
Client application
Service application
SMS Gateway Architecture
Client
Client
Application
Application
smsNotify
MAM
MAM
Server
Server
smsSend
!
!
Receiver
Receiver
thread
thread
Clients DB
!
!
Web
Web
Server
Server
thread
thread
Undeliered
SMS
ClientRegistration
Management
Application: Exam registration
! Paper forms, scanned with OCR
! Issue: 200.000 exams each year
! 20.000 errors
! Average delay: 3 months
Exam Registration Service
Statini Service
smsNotify
MAM
MAM
Server
Server
SMS
SMS
Gateway
Gateway
smsSend
Statini
Statini
Web
Web
Service
Service
Web
Web
Admin
Admin
Interface
Interface
Statini DB
University
DB
Database schema
DB Object Interface
! Generated using Raptier, a template-
based code generator
! Two classes for each table
– Docente
– DocentiCollection
DB access example
// get collection of all teachers
docenti = new DocentiCollection(db);
// get Docente with given codice
Docente d = docenti[codice];
// get courses taught by given teacher
cmd.CommandText = @"SELECT Insegnamenti.* FROM …
WHERE (DocentiInsegnamenti.Docente = '" + codice +
"')";
IDataReader rdr = cmd.ExecuteReader();
ArrayList courses = new ArrayList();
while (rdr.Read()) {
Insegnamento course = new Insegnamento(rdr);
courses.Add(course);
}
AA033 100070
28
Corso: Analisi
Studente: Aldo Busi
Voto: 28
Data: 12/05/2005
Conferma: sì
Benefits
! Cheap deployment:
– no special hardware
– no software installation on clients
! real-time feedback
! Immediate data validation
! Eliminate all paperwork
Issues
! Security
– SMS travels on SS7 signaling network
– One time passwords
! Legal validity
– Signature by professors
– Signature by students
Conclusion
! SMS gateway
! Future MMS
! Security enabled through embedded
Java on cell phones