Transcript Document

Using Web Services to Create Events
Web Services Explained
And
a Production Ready Example
Topics Covered
•
Web Services Example
•
Our Production Environment
•
What is a Web Service?
•
Why use Web Services with R25?
•
Creating an Event with Web Services
Web Services Example
•
The below file is included in case you are interested in
downloading this presentation, or if we have internet
connectivity issues.
Our Environment
•
All Windows 2003 Servers.
•
R25 Application Server 3.3
•
R25 Web Server 3.3
•
R25 Web Services 1.71
•
PeopleSoft CRM
•
Cold Fusion 8.0
What is a Web Service?
•
A web service exposes data, and processes for one
application for use in another application.
•
Web Services provides a layer of abstraction which protects
external applications from breaking if the internal mechanics
change.
•
There are many types of web services. R25 uses a REST
based system.
Web Application
R25 Web Services
App Server
Database
1
GET http://r25/event.xml?event_id=1234
Web Application
R25 Web Services
2
Event Information
1
POST http://r25/event.xml?event_id=1234
Web Application
R25 Web Services
2
Success/Fail
Why use Web Services with R25
Some things were not delivered with the event request form
that was provided.
•
No Implementation of Categories
•
No Way to Verify Room Availability
Creating an Event with Web Services
There are three main components to creating an event.
•
Authentication
•
Room Search
•
Event Creation
Authentication
Authentication is achieved with a challenge response
handshake.
•
GET r25ws/servlet/wrd/run/login.xml
•
Returns a string, that must be hashed with the password
•
The hash format is:
– hash({hash(password)}:{challenge string})
– The ‘:’ needs to be included in the hash. I found this misleading in
the documentation.
•
R25 Challenge Response Documentation is here:
http://knowledge25.collegenet.com/display/WSW/Authen
tication#Authentication-challengeresponseauth
Room Search
To perform a room search:
•
We created a temporary search, and run it via Web Services.
•
This is as powerful as building a search in the R25 client.
•
You could easily use this to create custom reports, or
custom calendar display on the web.
•
Searches follows the same conventions as the rest of R25’s
web services.
Event Creation
After the end user submits the form, we create the event.
The new event:
•
Is associated with the appropriate contact.
•
Has a default state of ‘Draft’.
•
Has an exact room match, which reduces human error.
•
Saves category data. Category data matches our public
website’s news categories.
Contact Information
Ben Liyanage
Information Systems Developer
[email protected]
Presentation & Code Available For Download Here
http://perfectresolution.com/?p=369
(You can also find it under the R25 tag)