26
A Web Service Gateway for SMS A Web Service Gateway for SMS - - based Services based Services Giuseppe Attardi, Daniele Picciaia, Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Antonio Zoglio Dipartimento di Informatica Dipartimento di Informatica Università di Pisa Università di Pisa

A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

Embed Size (px)

Citation preview

Page 1: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

A Web Service Gateway for SMSA Web Service Gateway for SMS--based Servicesbased Services

Giuseppe Attardi, Daniele Picciaia, Giuseppe Attardi, Daniele Picciaia, Antonio ZoglioAntonio Zoglio

Dipartimento di InformaticaDipartimento di InformaticaUniversità di PisaUniversità di Pisa

Page 2: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

MotivationMotivation

!! bridge between telephony bridge between telephony applications and Web applicationsapplications and Web applications

!! expose telephony services as XML expose telephony services as XML Web ServicesWeb Services

Page 3: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

ProtocolsProtocols

!! Parlay X Web ServicesParlay X Web Services!! SMS ForumSMS Forum

– SMPP (Short Message Peer to Peer)– MMAP (Mobile Message Access

Protocol)!! Vodafone service:Vodafone service:

– MAM (Messaggistica Aziendale Mobile)

Page 4: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

Network settingNetwork setting

GSM Operator

UserMAM Server

Message Center

Private IP connection

Parlay SMS

Gateway

ApplicationServers

Clients

MAM Protocol SOAP

Page 5: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

Software architectureSoftware architecture

!! XML Web ServiceXML Web Service!! WSDLWSDL!! SOAPSOAP!! Pattern subscribe/notifyPattern subscribe/notify

Page 6: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

TwoTwo--way Web Servicesway Web Services

!! Send Service:Send Service:– RequestIdentifier sendSms(destAddressSet,

senderName, charging, message)

!! Notify Service:Notify Service:– void notifySmsReception(RegistrationIdentifier,

smsServiceActivationNumber, SenderAddress, message)

Page 7: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

Web Service ArchitectureWeb Service Architecture

ServiceBroker

ServiceUser

ServiceProvider

UDDI/WSDLFind

Publ

ish

UDDI

Bind

SOAPCommunication: HTTP

Data: XML

Interactions: SOAP

Page 8: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

DiscoveryDiscovery

Let me talk to you (SOAP)Let me talk to you (SOAP)

Web Services ProtocolsWeb Services Protocols

How do we talk? (WSDL)How do we talk? (WSDL)Web Web

ServiceService

WebWebService Service

ConsumerConsumer

UDDIUDDI

Find a ServiceFind a Service

return service response (XML)return service response (XML)

http://yourservice.com/svc1

return service descriptions (XML)return service descriptions (XML)

http://yourservice.com/?WSDL

HTML with link to WSDLHTML with link to WSDL

http://yourservice.com

http://www.uddi.org

Link to discovery documentLink to discovery document

Page 9: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

InteroperabilityInteroperability

Parlay SMS

Gateway

ApplicationServers

MAM Protocol SOAP

C++Linux

C#Windows

HTMLany browser

Page 10: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

gSOAPgSOAP

!! C++ SOAP compilerC++ SOAP compiler!! From WSDL to .h headers and stub/proxy From WSDL to .h headers and stub/proxy

codecode!! Utilities:Utilities:

– wsdl2h (generates .h from WSDL)– soapcpp2 (generates stub/skeleton from .h)

!! High performance:High performance:– 1500 call/sec (gSOAP, C++)– 370 req/sec (Apache Axis, Java)

Page 11: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

WSDLWSDL<message name="<message name="sendSmsRequestsendSmsRequest">">

<part name="<part name="destAddressSetdestAddressSet" " element="element="tns:destAddressSettns:destAddressSet"/>"/>

<part name="<part name="senderNamesenderName" " element="element="tns:senderNametns:senderName"/>"/>

<part name="charging" <part name="charging" element="element="tns:chargingtns:charging"/>"/>

<part name="message" <part name="message" element="element="tns:messagetns:message"/>"/>

</message></message>

<message name="<message name="sendSmsResponsesendSmsResponse">"><part name="result" <part name="result"

element="element="tns:SmsIdentifiertns:SmsIdentifier"/>"/></message></message>

Page 12: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

wsdl2h outputwsdl2h output

intint sendSms(ArrayOfEndUserIdentifiersendSms(ArrayOfEndUserIdentifier* * destAddressSetdestAddressSet,,

string string senderNamesenderName,,string charging,string charging,string message,string message,string& string& SmsIdentifierSmsIdentifier););

Page 13: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

Client applicationClient application

Page 14: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

Service applicationService application

Page 15: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

SMS Gateway ArchitectureSMS Gateway Architecture

!!!!Receiverthread

!!!!Receiverthread

!!!!Web

Serverthread

!!!!Web

Serverthread

Clients DB

ClientApplication

ClientApplication

UndelieredSMS

smsNotify smsSend

MAMServerMAM

Server

ClientRegistration

Management

Page 16: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

Application: Exam registrationApplication: Exam registration

!! Paper forms, scanned with OCRPaper forms, scanned with OCR!! Issue: 200.000 exams each yearIssue: 200.000 exams each year!! 20.000 errors20.000 errors!! Average delay: 3 monthsAverage delay: 3 months

Page 17: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

Exam Registration ServiceExam Registration Service

StatiniWeb

Service

StatiniWeb

Service

WebAdmin

Interface

WebAdmin

Interface

Statini DB

smsNotify

smsSend

SMSGateway

SMSGateway

MAMServerMAM

Server

Statini Service

University DB

Page 18: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

Database schemaDatabase schema

Page 19: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

DB Object InterfaceDB Object Interface

!! Generated using Generated using RaptierRaptier, a template, a template--based code generatorbased code generator

!! Two classes for each tableTwo classes for each table– Docente– DocentiCollection

Page 20: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

DB access exampleDB access example

// get collection of all teachers// get collection of all teachersdocentidocenti = new = new DocentiCollection(dbDocentiCollection(db););// get // get DocenteDocente with given with given codicecodiceDocenteDocente d = d = docenti[codicedocenti[codice];];

// get courses taught by given teacher// get courses taught by given teachercmd.CommandTextcmd.CommandText = @"SELECT = @"SELECT InsegnamentiInsegnamenti.* .* FROM …FROM …

WHERE (DocentiInsegnamenti.Docente = '" + codice + WHERE (DocentiInsegnamenti.Docente = '" + codice + "')";"')";IDataReader rdr = cmd.ExecuteReader();IDataReader rdr = cmd.ExecuteReader();ArrayListArrayList courses = new courses = new ArrayListArrayList();();while (while (rdr.Readrdr.Read()) {()) {

InsegnamentoInsegnamento course = new course = new Insegnamento(rdrInsegnamento(rdr););courses.Add(coursecourses.Add(course););

} }

Page 21: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica
Page 22: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

AA033 10007028

Page 23: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

Corso: AnalisiStudente: Aldo BusiVoto: 28Data: 12/05/2005Conferma: sì

Page 24: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

BenefitsBenefits

!! Cheap deployment:Cheap deployment:– no special hardware– no software installation on clients

!! realreal--time feedbacktime feedback!! Immediate data validationImmediate data validation!! Eliminate all paperworkEliminate all paperwork

Page 25: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

IssuesIssues

!! SecuritySecurity– SMS travels on SS7 signaling network– One time passwords

!! Legal validityLegal validity– Signature by professors– Signature by students

Page 26: A Web Service Gateway for SMS- based Services - GARR · A Web Service Gateway for SMS-based Services Giuseppe Attardi, Daniele Picciaia, Antonio Zoglio Dipartimento di Informatica

ConclusionConclusion

!! SMS gatewaySMS gateway!! Future MMSFuture MMS!! Security enabled through embedded Security enabled through embedded

Java on cell phonesJava on cell phones