Title: For Monday
1For Monday
- No new reading
- Review code of ethics
- Program 7 due
2Program 7
3Questions before the quiz?
4Quiz
5DTD
- DTD Document Type Definition
- Defines the grammatical rules for the document
- Not required for XML but recommended for document
conformity - Can check the Validity of a XML document
(contains proper elements, attributes, etc.) - Uses EBNF grammar
- Represented by the DOCTYPE tag, which contains
three parts if it refers to an external subset - Root element applied
- Flag (e.g., SYSTEM (personal, non-standardized),
PUBLIC (standardized, publicly available)) - DTD name and location
6DTD Example
-
- city, state,
- zip, phone, flag)
-
-
-
-
-
-
-
-
-
-
-
7DTD Example (contd)
- !ELEMENT element type declaration
- Specifies that an element is being created
- Here, a letter is being created with one or more
contact element and one or more paragraph
element, in that order. - Operator means one or more occurrences
- Operator means zero or more occurrences
- Operator ? means zero or exactly one occurrence
- If no operator is included, exactly one
occurrence is assumed. - Others - alternatives
8DTD Example (contd)
- !ATTLIST element type declaration
- Defines the attribute of an element
- Here, the type of contract is defined to have
- A string (as given by CDATA), which is
unspecified and optional (as given by IMPLIED). - The string will not be parsed by XML processor
and will simply be passed directly to the
application - Others
- PCDATA means this element can store parsed
character data (i.e., text) - EMPTY means the element does not contain any
element - Commonly used for an elements attribute
- More Others
- IDs and IDREFs
9XML Resources
- W3C XML Standards Body
- http//www.w3c.org/xml
- Microsoft Developer Network (MSDN)
- http//msdn.microsoft.com/xml
- The BizTalk Framework
- http//www.biztalk.org
- IBMs XML Zone
- http//www.ibm.com/developer/xml/
10Web Services
11E-Commerce Scenarios
- Objective Capitalize on the success of
e-commerce and build a web site to sell books,
CDs, and others - Scenario1
- Build BillyBooks.com and compete directly with
the Amazon.coms of the world - Any chance of success here?
12E-Commerce Scenarios
Source Atkin, J., Amazon Everywhere, PC
Magazine, 9/2003.
13What are Web Services?
- Some definitions / characteristics
- A Web service is a software system designed to
support interoperable machine-to-machine
interaction over a network. It has an interface
described in a machine-processable format
(specifically WSDL). Other systems interact with
the Web service in a manner prescribed by its
description using SOAP-messages, typically
conveyed using HTTP with an XML serialization in
conjunction with other Web-related standards.
W3C 2003
14What are Web Services?
- definitions / characteristics (contd)
- Internet services available to silicon-based
life forms (as opposed to ones presented to
humans) Gosling 02 - Loosely coupled remote RPCs that would replace
todays tightly coupled RPCs, which require
application- and protocol-specific API
connection. .. Uses XML, rather than C or C,
to call procedures Gartner - Use protocols and data representations that are
internet friendly and ubiquitous - Next-generation service-oriented Internet
applications
15Why Web Services? Observations
- I couldnt make DCOM work. I tried and failed,
again and again. But I can make a Web service in
a heartbeat. -
- -- Jim Gray, Microsoft Distinguished Engineer
- (Turing Award ( Nobel Price for computing)
Winner)
16Why Web Services? Observations
- .NETs perspective
- The power of the XML Web Services model is
amazing. A company offering an online
electronic-payment service can expose its service
to partners, so that they can deliver it as part
of their own offering regardless of what
platform they are using. An airline can link its
online reservation system to that of a car-rental
partner, so travelers can book a car at the same
time they book a flight. An online auction
company can notify bidders when they are outbid
or have won an auction, or could partner with
other firms to offer alternative shipping,
fulfillment or payment options. XML Web services
help your business break free of its boundaries.
- Bill Gates
17Why Web Services? Observations
- Javas perspective (J2EE 1.4 Web Services
Framework) - Java API for XML
- JAXP (Processing)
- JAXM (Messaging)
- JAXR (Registering)
- JAX-RPC
18Why Web Services? Observations
- Projected Revenues
- 380 millions in 2001 vs. 15.5 billions in 2005
(Source ZapThink, Inc. 02) -
- IDC estimate 1.6 billions in 2004 vs. 34
billions in 2007 (Source South China Morning
Post, May 28, 02)
19Why Web Services? Observations
- The industry is aligned
- Broad industry initiative for Web services
- Over 150 industry leaders
- Interoperability across platforms, applications,
and languages
20Why Web Services? Observations
21Why Web Services?
- Interoperable
- Easy to use
- Reusable
- Ubiquitous
22Why Web Services?
- eBusiness Paradox Clarke 02
- The promise of networked businesses will not be
realized until we can rapidly and dynamically
interoperate
23Why Web Services?
- Need to interoperate within our enterprise and
interoperate between enterprises
24Why Web Services?
- Traditionally, client and server need to
understand - Implementation details
- Service deployment
- Security types and trusts
- etc.
- They must speak the same platform (COM to COM,
EJB to EJB, ORB to ORB, etc.) - Web Services are the result of
- Evolution of 3 generations of Web Applications
Source Gusmano 02
251st Generation Web Applications
Servers Data, Hosts
UI Logic
Biz Logic
Browsers
OS Services
Source Gusmano 02
262nd Generation Web Applications
Servers Data, Hosts
Richer Browsers
Source Gusmano 02
27Next Generation Web Applications
Applications Become Programmable Web Services
Standard Browsers
Open Internet Communications Protocols (HTTP,
SMTP, XML, SOAP)
Source Gusmano 02
28Web Services Life Cycle
Service Registry (e.g., IBM UDDI service)
? publish service (e.g., stock quote)
? find service
Service Provider (e.g., Brokerage House)
Service Requester (e.g., XYZ Financial Software)
? bind to service
Life Cycle of a Web Service Execution (Registry,
Lookup, and Consumption)
29What is Under the Hood?
30Web Services SOAP, WSDL, UDDI
31An Overview of SOAP
- Simple Object Access Protocol
- Lightweight XML-based messaging format
- Builds on
- W3C XML standards
- IETF HTTP standard
- Works with
- Any operating system
- Any programming language
- Any platform
32What is a SOAP Message?
SOAP Message
Protocol Headers
SOAP Header
Headers
SOAP Body
Message Name Data
33Simple SOAP Request (Using HTTP)
POST /StockQuote HTTP/1.1 Host
www.stockquoteserver.com Content-Type text/xml
Content-Length 323 SOAPAction
www.stockquoteserver.com/GetLastTradePrice l version1.0 encodingutf-8? lope xmlnsSOAP-ENV"http//schemas.xmlsoap.org/s
oap/envelope/" SOAP-ENVencodingStyle"http//sch
emas.xmlsoap.org/soap/encoding/"
xmlnsm"Some-Namespace-URI"
DIS
34Simple SOAP Response (Using HTTP)
HTTP/1.1 200 OKContent-Type text/xml
charsetutf-8 Content-Length nnnn version1.0 encodingutf-8? pexmlnsSOAP-ENV"http//schemas.xmlsoap.org/soap
/envelope/"SOAP-ENVencodingStyle"http//schemas
.xmlsoap.org/soap/encoding/"
espace-URI" 24.5
35WSDL
- Web Services Description Language
- Lets Web Services describe
- what they are
- where they can be found
- how they should be used
36Simplified WSDL example
-
-
-
-
-
- .asmx"/
-
- soapAction"http//tempuri.org/HelloWorld"
-
-
-
-
-
37UDDI
- Universal Description, Discovery, and Integration
- Lets companies find publicly available Web
Services on the Internet or corporate Intranets.
38UDDI
39How useful are Web Services?
- Web services Some possibilities
- Financial information (e.g., stock quotes)
- Sports information
- Weather information
- News
- Delivery status
- Tax and shipping calculations
- Any data that is relevant to the client
40Web Services Demo
- Examples
- College Admission Portal
- http//138.87.169.879999/transcriptRequest/index.
htm - Microsoft TerraService
- http//terraserver.microsoft.net/default.aspx
41Web Services Who?
- Who is doing this?
- Vendors
- Microsoft, IBM, Sun, Oracle, HP, BEA, etc.
- .NET passport, Calendar, Alerts, Amazon Web
Services, etc. - Users/Consumers
- Nordstrom, General Motors, etc.
- List of public Web Services http//www.xmethods.ne
t/ - Who should pay attention to this?
- All of us!
42Web Services When?
43Web Services When?
- Web Services will enter most organizations in
three distinct phases Source IDC - 2002 (within the firewall)
- Simplified app integration
- Increased developer productivity
- 2004 (contained external users)
- Simplified business-partner connectivity
- Richer app functionality
- Subscription-based services
- 2006 to 2008 (fully dynamic search and use)
- Casual / ad-hoc use of services
- New business models possible
- Commoditization of software
- Pervasive use in nontraditional devices
44Web Services The Not?
- Challenges/Issues
- Reliability / Consistency
- Security
- Authentication
- Privacy
- Billing
- Reuse
- Performance
- Incompatible implementations of standards
45Web Services Lingua Franca
Source Clarke 02
46References
- Clarke, N., .Net the J2EE Web Services - Can
we live together?, JavaOne 2002. - Gosling, J., Next-Generation Web Services
Conference, Keynote address, Jan, 2002. - Gusmano, M., Build Web Services with VB.NET,
Microsoft Internet Developer Group, April 2001.