Social Query André ([email protected]) Jacinto ([email protected])
MoSOA Vítor Braga – [email protected]@cin.ufpe.br Marcelo Amorim –...
Transcript of MoSOA Vítor Braga – [email protected]@cin.ufpe.br Marcelo Amorim –...
MoSOAVítor Braga – [email protected]
Marcelo Amorim – [email protected]
Pedro Lages – [email protected]
Roteiro
• Introdução• Processo• Requisitos• Casos de uso• A&P• Conclusão
Introdução
• MoSOA– Framework para Desenvolvimento de
Aplicações Móveis Orientadas a Serviços – Tecnologia Java ME (CLDC 1.1/MIDP2.0)– Open source (GPL)
http://sourceforge.net/projects/mosoa/
Processo
• ... Detalhar o processo de A&p
Requisitos Funcionais
• Acesso a serviços
• Persistência de dados
• Internacionalização
• Execução de serviços
Requisitos Não Funcionais
• Reusabilidade
• Extensível
• Portabilidade
• Sistema Open-source
Casos de Uso
Gravar dados no RMS
ler dados do RMS
modificar Dados RMS
apagar dados do RMS
ler propriedades do sistema
configurar arquivo de internacionalizacao
web serviceChamar servico
ler arquivo de texto
<<include>><<include>>
<<include>><<include>>
tratar eventos do usuario
Aplicação
gerenciar serviços da aplicação
A&P
• Análise dos casos de uso• Relacionamento entre pacotes• Detalhamento de pacotes(e subsistemas)• Mapeamento das classes de análise -
projeto• Padrões de projeto • Divisão em camadas• Diagrama de classes completo
UC01- Chamar Serviços
• Classes de Análise
WebServiceAcess
getServiceResult()
ServiceCall
chamarServico()
<no rolename> ( CommunicationControl )
<<boundary>>
SopMessage
nameSpace : StringwebServiceUrl : StringwsdlVersion : Stringmetthod : Stringversion : Stringstyle : String
<<entity>>
CommunicationControl
setResponseListener()setTimeOut()getServiceResult()setResult()
<no rolename> ( WebServiceAcess )<no rolename> ( SopMessage )<no rolename> ( ResponseListener )
<<control>>
ResponseListener
timeOut
processResult()processError()setTimeOut()
<<entity>>
UC01- Chamar Serviços
• Diagrama de sequencia
/ desenvolvedorR1 : Aplicação
/ serviceCallR1 : ServiceCall
/ webServiceAcessR1 : WebServiceAcess
/ web_serviceR1 : web service
/ communicationControlR1 : CommunicationControl
/ sopMessageR1 : SopMessage
1: chamarServico()1: chamarServico()1.1: soapResult = chamarServico()1.1: soapResult = chamarServico()
1.1.1: soapMessage = new Message()1.1.1: soapMessage = new Message()
1.1.2: setResponseListener(ResponseListener)1.1.2: setResponseListener(ResponseListener)
1.1.2.1: setTimeOut(timeout)1.1.2.1: setTimeOut(timeout)
1.1.3: soapResult = getServiceResult(soapMessage)1.1.3: soapResult = getServiceResult(soapMessage)1.1.3.1: getServiceResult()1.1.3.1: getServiceResult()
1.1.4: setResult(soapResult)1.1.4: setResult(soapResult)
UC01- Chamar Serviços
• VOPCServiceCall
chamarServico()
<no rolename> ( CommunicationControl )
<<boundary>>
ResponseListener
timeOut
processResult()processError()setTimeOut()
<<entity>> SopMessage
nameSpace : StringwebServiceUrl : StringwsdlVersion : Stringmetthod : Stringversion : Stringstyle : String
<<entity>>CommunicationControl
setResponseListener()setTimeOut()getServiceResult()setResult()
<no rolename> ( WebServiceAcess )<no rolename> ( SopMessage )<no rolename> ( ResponseListener )
<<control>>
10..*
10..*
WebServiceAcess
getServiceResult()
1
1
1
1
SoapResult
result : HashMap
setResult()getResult()
<<entity>>
UC02- Gravar Dados no RMS
• Classes de Análise
UC01- Gravar Dados no RMS
• Diagrama de sequencia
UC01- Gravar Dados no RMS
• VOPC
UC02- Ler Arquivo de Propriedades
• Classes de Análise
UC02- Ler Arquivo de Propriedades
• Diagrama de sequencia
UC02- Ler Arquivo de Propriedades
• VOPC
Relacionamento entre Pacotes
W ebServiceCom munication
<<subsystem >>
i18n<<global>>
Properties
R M S ServiceControl
M SoapAPI
U I
FileIW ebServiceCom m unication
callService()
(from W ebS erviceC om m unication)
Detalhamento de Subsistema
• Contexto
SoapResponse
result : HashMap
ServiceResponseListener
response : SoapResponse
processResponse()processError()
HttpTransport
request()
(from MSoapAPI)
ServiceCallThread
timeout : LongresponseListener : ServiceResponseListenersoapEnvelope : SOAPEnvelope
setTimeout()setResponseListener()
11 11
1
1
1
1
SOAPEnvelope(from MSoapAPI)
FachadaWebServiceCommunication
IWebServiceCommunication
callService()
WebServiceCommunicationControl
callService()setTimeOut()setResponseListener()resquestService()createSoapEnvelope()
1
1
1
1
SoapObject(from MSoapAPI)
Detalhamento de Subsistema IW ebS erv ic eC ommunic a tion
c a llS e rv ic e ()
W ebS erv ic eC ommunic a tionC ontro l
c a llS e rv ic e ()
se tT imeO ut()
se tR esponseL istener()
resquestS erv ic e ()
c rea teS oapE nv e lope ()
F ac hadaW ebS erv ic eC ommunic a tion1
1
1
1
S O A P E nv e lope
V E R S IO N _ 2_ 1 : in t
R P C _ E N C O D E D : in t
D O C U M E N T _ L IT E R A L : in t
multip leB odyC hildren : boo lean
V E R S IO N _ 2_ 2 : in t
c lassR egiste r : L og ic a l V iew ::jav a ::util::H ashtable
objec tL ist : L ogic a l V iew ::jav a ::util::V ec to r
method : L og ic a l V iew ::jav a ::lang::S tring
nameS pac e : L og ic a l V iew ::jav a ::lang::S tring
debug : boo lean
v ersion : int
style : int
S O A P E nv e lope ()
reg iste rC lass()
ge tR esult()
ge tH eader()
se tN ameS pac e ()
ge tN ameS pac e ()
ge tM ethod()
se tM ethod()
addO bjec t()
addD ec ima l()
addL ong()
addInt()
addS tring()
pa rse ()
toS oapR equest()
toD oc umentL ite ra lR equest()
toR pc E nc odedR eq uest()
soapO bjec tT oX M L L ite ra l()
soapO bjec tT oX mlE nc oded()
isA rrayO fP rimitiv es()
addE nc odedA rray()
ge tT ypeF orO bjec t()
w riteR equest()
toS tring()
ge tO bjec tL ist()
ge tC lassR egiste r()
se tC lassR egiste r()
debug()
ge tV ers ion()
se tV ers ion()
ge tS tyle ()
se tS tyle ()
isM ultip leB odyC hildren()
se tM ultip leB odyC hildren()
(from msoapapi)
S O A P O bjec t
ge tN ameS pac e ()
ge tT ype()
ge tN ame()
se tN ameS pac e ()
se tT ype()
se tN ame()
ge tV a lue ()
se tV a lue ()
ge tV a lueN ames()
(from msoapapi)
S erv ic eC a llT hread
timeout : L ong
responseL istener : S e rv ic eR esponseL istener
soapE nv e lope : S O A P E nv e lope
se tT imeout()
se tR esponseL istener()
H T T P T ransport
k eepS ession : boo lean
debug : boo lean
url : L ogic a l V iew ::jav a ::lang::S tring
c ook ie : L og ic a l V iew ::jav a ::lang::S tring
H T T P T ransport()
request()
debug()
(from transpo rt)
1
1
1
1
S erv ic eR esponseL istener
response : S oapR esponse
proc essR esponse ()
proc essE rro r()
1
1
1
1
S oapR esponse
resu lt : H ashM ap
1
1
1
1
R unnable
run()
(from lang)
Detalhamento com engenharia reversa da MsoapAPI, MIDP 2.0 e CLDC1.1
Detalhamento de Subsistema
• Cápsulas e protocolos
FacadeWebServiceCommunication
<no rolename> ( WebServiceCommunicationControl )
+ / CallService
<<Capsule>>
CallService
resquestServiceResult (void)
responseServiceResult (void)
<<Protocol>>
WebServiceCommunicationCControl
<no rolename> ( IWebServiceCommunication )
+ / CallService+ / WebServiceResult
<<Capsule>>
WebServiceResult
requestSoapResponse (void)
soapResponse (void)
<<Protocol>>
ServiceThread
<no rolename> ( ServiceResponseListener )<no rolename> ( HttpTransport )
+ / WebServiceResult
<<Capsule>>
Detalhamento de Subsistema
FacadeWebServiceCommunication
<no rolename> ( WebServiceCommunicationControl )
+ / CallService
<<Capsule>>
WebServiceCommunicationCControl
<no rolename> ( IWebServiceCommunication )
+ / CallService+ / WebServiceResult
<<Capsule>>
ServiceThread
<no rolename> ( ServiceResponseListener )<no rolename> ( HttpTransport )
+ / WebServiceResult
<<Capsule>>
CallService
resquestServiceResult (void)
responseServiceResult (void)
<<Protocol>>
CallService <<Port>>CallService <<Port>>
CallService
<<Port>>
CallService
<<Port>>
WebServiceResult
requestSoapResponse (void)
soapResponse (void)
<<Protocol>>
WebServiceResult
<<Port>>
WebServiceResult
<<Port>>
WebServiceResult
<<Port>>
WebServiceResult
<<Port>>
Referencias
• Documentos:– http://www.cin.ufpe.br/~vtb/aps/
• Mais Informações: – http://sourceforge.net/projects/mosoa/
Padrões de Projeto
• Padrões de projetos usados...
Dúvidas??? Dúvidas?
MoSOAVítor Braga – [email protected]
Marcelo Amorim – [email protected]
Pedro Lages – [email protected]