SOAP and RESTful web services in Sakai

5,718 views
5,449 views

Published on

Presented at AuSakai 2010 in Sydney, Australia

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,718
On SlideShare
0
From Embeds
0
Number of Embeds
76
Actions
Shares
0
Downloads
70
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide













  • SOAP and RESTful web services in Sakai

    1. 1. SOAP
and
RESTful
web
services
in
 Sakai Steve
Swinsburg Senior
So;ware
Engineer
/
Sakai
Fellow The
Australian
Na@onal
University September
2010
    2. 2. SOAP
services Enabling
and
securing
them How
to
use
them REST
services How
to
use
them En@ty
Broker Overview 4th
Australian
Sakai
Conference
‐
September
15‐17,
2010 2
    3. 3. SOAP
services • Provided
via
Apache
Axis • Can
expose
any
API
method,
just
inject
the
service
 bean
and
use
it • Run@me
compila@on,
can
modify
‘live’ • Require
a
valid
session,
generally
admin. • There’s
a
webservice
to
do
that! http://your.sakai.server/sakai-axis/*.jws 4th
Australian
Sakai
Conference
‐
September
15‐17,
2010 3
    4. 4. Enabling
the
SOAP
services • Disabled
by
default • In
sakai.proper@es: webservices.allowlogin=true webservices.allow=.+ webservices.log-allowed=true webservices.log-denied=true • This
is
insecure
though.
Setup
properly. 4th
Australian
Sakai
Conference
‐
September
15‐17,
2010 4
    5. 5. Using
the
SOAP
services • Script
them
via
Perl
/
PHP
/
Java
... • If
Perl,
the
SOAP::Lite
module
is
excellent! • Or
use
a
client: • Mac:
h^p://ditchnet.org/soapclient/ • PC/Mac/Linux:
h^p://www.soapui.org/
 4th
Australian
Sakai
Conference
‐
September
15‐17,
2010 5
    6. 6. Demo 4th
Australian
Sakai
Conference
‐
September
15‐17,
2010 6
    7. 7. REST
services • Provided
via
En@tyBroker • RESTful
URLs
and
adheres
to
HTTP
standard
for
 ac@ons
and
responses • Return
XML/JSON/HTML
view
of
an
en@ty
or
list
of
 en@@es • Default
ac@ons
(GET,
PUT,
DELETE
etc) • Can
also
define
custom
ac@ons http://your.sakai.server/direct 4th
Australian
Sakai
Conference
‐
September
15‐17,
2010 7
    8. 8. Using
the
REST
services • Simply
make
a
request! • /direct/profile/steve.json • /direct/user/current.xml • /direct/announcement/user.json?n=10&d=30 4th
Australian
Sakai
Conference
‐
September
15‐17,
2010 8
    9. 9. Demo
&
jQuery
code
sample 4th
Australian
Sakai
Conference
‐
September
15‐17,
2010 9
    10. 10. En@ty
Broker • Fast
becoming
the
defacto
standard
for
exposing
 your
data. • More
consumers
than
just
Java
(PHP/JS/even
just
 HTML) • e.g.
profile
images
exposed
as
direct
link /direct/profile/steve/image 4th
Australian
Sakai
Conference
‐
September
15‐17,
2010 10
    11. 11. En@ty
Broker • If
you
have
a
service
layer,
include
EB • Can
have
your
providers
in
your
webapp • Special
Spring
setup
to
allow
them
to
register • Can
also
register
events
with
SiteStats
via
 En@tyBroker.
 • Easy
config,
all
done
within
the
tool
rather
than
within
 SiteStats. 4th
Australian
Sakai
Conference
‐
September
15‐17,
2010 11
    12. 12. EB
code
sample 4th
Australian
Sakai
Conference
‐
September
15‐17,
2010 12
    13. 13. Questions? SOAP
services
info
and
code
samples h0p://confluence.sakaiproject.org/display/WEBSVCS/How+to+use +the+Sakai+Web+Services REST
services
info h0p://your.sakai.server/direct 4th
Australian
Sakai
Conference
‐
September
15‐17,
2010 13

    ×