What are Web Services?

Download Report

Transcript What are Web Services?

Using Account Status Web Service to
design value-added services for your
online applications
1
Ivan Chan
Media & Systems Services
8th Annual HKIUG Meeting
3-4 December, 2007
Agenda
•
•
•
•
•
2
What are Web Services?
How Web Services work?
Why chose Web Services?
Account Status Web Service by Innovative
Possible use of AS Web Service in your online
applications
What are WEB Services?
• “ Web services are software applications (programs)
that use XML to exchange data (information)
with other applications on other computers by
using Internet protocols. …. Requests can be sent
and responses received between two differing
applications on two separate computers
belonging to separate business enterprises or
small businesses. …..”
(Reference: http://www.hitmill.com/webservices/index.htm)
3
What is WEB Services?
• "The W3C defines a Web service as a software
system designed to support interoperable
Machine to Machine interaction over a
network..."
(Reference: Wikipedia, http://en.wikipedia.org/)
4
How Web Services work?
(Reference: SC Yu & RS Chen (2003), Web Services: XML-based system integrated techniques, The Electronic Library, issue 21, vol. 4,
Academic Research Library, p.362.)
5
How Web Services work?
Service Provider
Web Services Stack
BUSINESS LOGIC
Web Services
Client Applications
SOAP
Server
WSDL (2.0) and
XML Schema
TCP/IP
XML Request
XML Response
6
How Web Services work?
SOAP (Service Oriented Architecture Protocol)
• “SOAP is a protocol for exchanging XML-based
messages over computer networks, normally using
HTTP/HTTPS. SOAP forms the foundation layer of
the Web services stack, providing a basic messaging
framework upon which abstract layers can be built…”
(Reference, Wikepedia, http://en.wikipedia.org/wiki/SOAP)
7
How Web Services work?
• SOAP includes four important parts
needed for communication
– Interface : describes all publicly available
functions
– Data types: lists the data type information
required for message request and response
– Bindings : transport protocol
– Address : identifies where the service is
located
8
How Web Services work?
• Web Services Description Language (WSDL)
• “WSDL provides a way for service providers to describe the
basic format of web service requests over different protocols
or encodings. WSDL is used to describe what a web service
can do, where it resides, and how to invoke it.”
(Reference, A Web Services Primer, published on xml.com,
http://www.xml.com/pub/a/ws/2001/04/04/webservices/index.html)
• XML-based format
• allows service interfaces to be described along with
the details of the bindings to specific protocols
9
Example of WSDL Using SOAP
This example is extracted from a part of coding in Innovative Web Service.
Part 1: Interface, describes all publicly available functions
<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions targetNamespace="http://<server>/<application directory>/<INTERFACE>"
xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap=http://xml.apache.org/xml-soap
xmlns:impl=http://<server>/<application directory>/ patronio
xmlns:intf=http://<server>/<application directory>/ patronio
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/
xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
<schema targetNamespace="http://< server>/<application directory>/patronio“
xmlns="http://www.w3.org/2001/XMLSchema">
10
Example of WSDL Using SOAP
Part 2: Data Types Information
- <complexType name="PatronFine">
- <sequence>
<element name="amountPaid" type="xsd:int" />
<element name="itemRecordNum" type="xsd:int" />
<element name="itemTitle" nillable="true" type="xsd:string" />
<element name="originalPatronID" type="xsd:int" />
<element name="patronID" type="xsd:int" />
<element name="printBill" type="xsd:boolean" />
<element name="processingFee" type="xsd:int" />
<element name="terminalPaidAt" type="xsd:int" />
<element name="transferDate" nillable="true" type="xsd:dateTime" />
</sequence>
</complexType>
11
Example of WSDL Using SOAP
Part 3 & 4: Binding and Address to identify where the service
is located
- <wsdl:service name="PatronIOService">
- <wsdl:port binding="impl:PatronIOSoapBinding" name="PatronIO">
<wsdlsoap:address location="http://<address>:<port, e.g. 6060>/<PATH e.g. /iii/patronio>" />
</wsdl:port>
</wsdl:service>
12
Why chose Web Services?
Connecting Applications…
• “Web services help to solve the interoperability problem by
giving different applications a way to link their data. Using
Web services you can exchange data between different
applications and different platforms.”
(http://www.w3schools.com/webservices/ws_why.asp)
• Web Services are an emerging technology which offers a
solution for providing a common collaborative architecture.
• Web Services provide functional building blocks which are
not tied to any particular programming language or hardware
platform.
13
Why chose Web Services?
• Web Services can be readily accessed through browsers,
wireless devices, voice-activated interfaces, and so on.
• Web Service can talk to another Web Service, and ask that
Web Service to do something.
• Accessible over standard Internet protocols (HTTP/HTTPS
and SMTP)
14
Account Status Web Service Innovative
• Development project with III
• Allow retrieval of patron circulation account
information maintained within the Millennium
System
• Rather than HTML formatted web page (such
as PatronAPI product), the extracted data will
be presented as XML format
15
Account Status Web Service Innovative
• Hosted within the same Millennium
Server
• AS Web Services will provide:
– Current checkouts, including due date
– Item available for pickup
– Status of outstanding holds
• is being developed, please wait for the
production release…
16
Account Status Web Service Innovative
• System Requirement
– Apache AXIS
• is an open source, XML based Web service
framework. It is an implementation of the SOAP,
which provides various utilities and APIs for
Web service applications.
– WSDL
• would be needed for client application to
communicate with AS Web Service
17
Possible use of AS Web Service in
your online applications
Campus Portal
Example 1: Campus Portal Integration
Message of MyLibrary Today:
Display a summary of
overdue, recall & pickup items.
18
Possible use of AS Web Service in
your online applications
Example 1 (cont): Campus Portal Integration
MyLibrary,
showing Checkout
and Hold Information
19
Possible use of AS Web Service in
your online applications
Account Status Web Service
Middleware
Application
(WS Client)
eMail (SMTP) using
iCalendar protocol
Example 2:
Connecting Applications
Via Internet Technology
e.g. iCalendar
20
Examples: Microsoft Outlook Calendar,
Yahoo™ Calendar, Google™ Calendar
Possible use of AS Web Service in
your online applications
• iCalendar allows users to send meeting
requests and tasks to other users through
email.
(Reference: http://en.wikipedia.org/wiki/ICalendar)
• Send circulation due date and recall date
to patron’s Calendar as an event.
21
Possible use of AS Web Service in
your online applications
Account Status Web Service
Middleware
Application
(WS Client)
Google™ Calendar
Data API
(WS Client)
Portal Example 3:
Connecting Applications
Via another Web Services
e.g. Google Calendar API
Push mail
22
Google Calendar
Possible use of AS Web Service in
your online applications
Account Status Web Service
Short Message
Application Part (SMAP)
Middleware
Application
(WS Client)
OR
Mobile Message
Access Protocol (MMAP)
Mobile Phone
Example 4: Connecting Industrial Application
Such as Short Message Service (SMS)
Push mail
23
Possible use of AS Web Service in
your online applications
• Mobile Message Access Protocol is a SOAP-based
protocol for sending SMS/MMS (Multimedia Message
Service) messages.
• Circulation due date and request pickup date can be
sent to patron’s mobile phone via SMS/MMS
• If AS Web Service could support RENEWAL,
theoretically, the material can be renewed by
sending a SMS.
24
Possible use of AS Web Service in
your online applications
Moreover, by exporting patron’s circulation
records, the information can also be integrated
with the following applications:
• Weekly email alert message for receiving
outstanding loan information
• Express Terminal for checking current loan
status by scanning campus smartcard
25
Look for the future…
The Web Services for patron’s circulation record should be a
complete set of
• Patron Record Data manipulation
– CREATE, RETRIEVE, MODIFY and DELETE patron record.
• Circulation Record
– Retrieval of checkout, hold and loan history records.
– Accepting Renewal and Recall requests
– Fine payment updating
Can it be done for Cataloguing or Acquisitions Module? e.g.
updating E-Resources items
26
Thank you!
eMail:
[email protected] (Mr. Ivan Chan)
27