Current JBoss Version 5.1.0 - GetACoder

tastelessbeachInternet and Web Development

Nov 12, 2013 (3 years and 11 months ago)

97 views



Creation of a minimal proof
-
of
-
concept application with JBoss Seam and JBossWS



Current JBoss Version 5.1.0.GA



The underlying MySQL database will contain the following tables

o

users
[username]

o

users_properties
[username, property_key, property_value]

o

services
[address, service_short_name, service_description]

o

The password will be stored in table users_properties,
property_key="password", property_value="whateverpassword", cleartext can
be used



Implementation o
f a simple JBossWS webservice

o

"
http://{address}/webservices/sysvinit(service,action)
"

o

--
> will execute: /etc/init.d/{
service} {action}

o

Parameters: action={start|stop|restart}, service=anyString, no sanity checks, no
special treatment

o

Return value: exit code of shell execution 0:success <>0:failed

o

Secure Webservice according to
http://www.jboss.org/community/wiki/JBossWS
-
WS
-
Securityoptions




Development of a seam application

o

login form (JSF)



successful login: forward to serv
ice overview form



failed login: output message, stay in login form

o

implement beans for the 3 database tables

o

admin beans for form actions

o

service overview form (JSF)



only visible for logged in users



displays content of table services with three butto
ns for each row:
[start]

[stop]

[restart]
, these buttons will trigger the ServiceAdmin
bean which will call the webservice "sysvinit" on host {address}



display of return value of webservice call after pressing either of the
buttons (a little message sayin
g "
SUCCESS
" or "
FAILED
").



logout button, logs out the user and forwards to login page, with
message "you were logged out"



Implementation of seam Authentication mechanism according to
http://docs.jboss.com/seam/2.2.0.GA/reference/en
-
US/html/security.html#d0e8698

,
but with 2 tables: users, users_properties, Steps: 1) Lookup u
ser in
users
, 2) Lookup
password in
users_properties




Test of the application

o

insert test data into DB

o

test a successful login

o

Test: failed login, Expected Result: Message

o

Test: successful login, Expected Result: Forward to service overview form

o

Test: Click on [start] / [stop] / [restart] in service overview form,



Expected Results:



Trigger Webservice



pass correct parameters



call init script with parameter "start"/"stop"/"restart"



see return value on the calling screen



create deployment pacak
ges for each of the components (webservice, seam
application)



Preferred dev environment: eclipse



Documentation only needed for tricky parts ("why I did that" where you think it's
applicable)



Please don't post long descriptions of your company, only repl
y telling whether you
can solve it and maybe how you could solve it.



Criteria for payment: Obtain Source code, see demo of the application



Criteria for a good feedback: Tests pass, all given architectural aspects are
implemented, good coorperation.



In c
ase the project continues, future coorperation possible