SlideShare a Scribd company logo
Building Web Services With Java Making Sense Of
Xml Soap Wsdl And Uddi 2nd Edition 2nd Edition
Steve Graham download
https://ebookbell.com/product/building-web-services-with-java-
making-sense-of-xml-soap-wsdl-and-uddi-2nd-edition-2nd-edition-
steve-graham-2128566
Explore and download more ebooks at ebookbell.com
Here are some recommended products that we believe you will be
interested in. You can click the link to download.
Building Web Services With Java Making Sense Of Xml Soap Wsdl And Uddi
1st Steve Graham
https://ebookbell.com/product/building-web-services-with-java-making-
sense-of-xml-soap-wsdl-and-uddi-1st-steve-graham-4433816
Building Restful Web Services With Java Ee 8 Create Modern Restful Web
Services With The Java Ee 8 Api Paperback Marioleander Reimer
https://ebookbell.com/product/building-restful-web-services-with-java-
ee-8-create-modern-restful-web-services-with-the-java-ee-8-api-
paperback-marioleander-reimer-10416642
Building Restful Web Services With Java Ee 8 Marioleander Reimer
Marioleander Reimer
https://ebookbell.com/product/building-restful-web-services-with-java-
ee-8-marioleander-reimer-marioleander-reimer-7261842
Developing Restful Services With Jaxrs 20 Websockets And Json A
Complete And Practical Guide To Building Restful Web Services With The
Latest Java Ee7 Api Bhakti Mehta
https://ebookbell.com/product/developing-restful-services-with-
jaxrs-20-websockets-and-json-a-complete-and-practical-guide-to-
building-restful-web-services-with-the-latest-java-ee7-api-bhakti-
mehta-5468964
Building Restful Web Services With Spring 5 Leverage The Power Of
Spring 50 Java Se 9 And Spring Boot 20 2nd Edition 2nd Edition Raja
Csp Raman
https://ebookbell.com/product/building-restful-web-services-with-
spring-5-leverage-the-power-of-spring-50-java-se-9-and-spring-
boot-20-2nd-edition-2nd-edition-raja-csp-raman-38560882
Building Web Services With Microsoft Azure Quickly Develop Scalable
Restbased Applications Or Services And Learn How To Manage Them Using
Microsoft Azure Alex Belotserkovskiy
https://ebookbell.com/product/building-web-services-with-microsoft-
azure-quickly-develop-scalable-restbased-applications-or-services-and-
learn-how-to-manage-them-using-microsoft-azure-alex-
belotserkovskiy-5468056
Building Web Services With Abap And Sap Web Application Server 2003
Sap
https://ebookbell.com/product/building-web-services-with-abap-and-sap-
web-application-server-2003-sap-11146956
Building Restful Web Services With Go Learn How To Build Powerful
Restful Apis With Golang That Scale Gracefully 1st Edition Naren
Yellavula
https://ebookbell.com/product/building-restful-web-services-with-go-
learn-how-to-build-powerful-restful-apis-with-golang-that-scale-
gracefully-1st-edition-naren-yellavula-52767254
Building Restful Web Services With Net Core Developing Distributed Web
Services To Improve Scalability With Net Core 20 And Aspnet Core 20
Gaurav Aroraa Tadit Dash
https://ebookbell.com/product/building-restful-web-services-with-net-
core-developing-distributed-web-services-to-improve-scalability-with-
net-core-20-and-aspnet-core-20-gaurav-aroraa-tadit-dash-11077150
Building Web Services With Java Making Sense Of Xml Soap Wsdl And Uddi 2nd Edition 2nd Edition Steve Graham
Building Web Services With Java Making Sense Of Xml Soap Wsdl And Uddi 2nd Edition 2nd Edition Steve Graham
Building Web
Services with Java
Sams Publishing, 800 East 96th Street, Indianapolis, Indiana 46240
DEVELOPER’S
LIBRARY
M A K I N G S E N S E O F X M L , S O A P ,
W S D L , A N D U D D I
Steve Graham
Doug Davis
Simeon Simeonov
Glen Daniels
Peter Brittenham
Yuichi Nakamura
Paul Fremantle
Dieter König
Claudia Zentner
Second Edition
Building Web Services with Java,
Second Edition
Copyright © 2005 by Sams Publishing
All rights reserved. No part of this book shall be reproduced, stored
in a retrieval system, or transmitted by any means, electronic,
mechanical, photocopying, recording, or otherwise, without written
permission from the publisher. No patent liability is assumed with
respect to the use of the information contained herein.Although
every precaution has been taken in the preparation of this book, the
publisher and author assume no responsibility for errors or omis-
sions. Nor is any liability assumed for damages resulting from the use
of the information contained herein.
International Standard Book Number: 0-672-32641-8
Library of Congress Catalog Card Number: 2004091343
Printed in the United States of America
First Printing: July 2004
07 06 05 04 4 3 2 1
Trademarks
All terms mentioned in this book that are known to be trademarks
or service marks have been appropriately capitalized. Sams
Publishing cannot attest to the accuracy of this information. Use of a
term in this book should not be regarded as affecting the validity of
any trademark or service mark.
Warning and Disclaimer
Every effort has been made to make this book as complete and as
accurate as possible, but no warranty or fitness is implied.The infor-
mation provided is on an “as is” basis.The author and the publisher
shall have neither liability nor responsibility to any person or entity
with respect to any loss or damages arising from the information
contained in this book or from the use of the CD or programs
accompanying it.
Bulk Sales
Sams Publishing offers excellent discounts on this book when
ordered in quantity for bulk purchases or special sales. For more
information, please contact
U.S. Corporate and Government Sales
1-800-382-3419
corpsales@pearsontechgroup.com
For sales outside of the U.S., please contact
International Sales
1-317-428-3341
international@pearsontechgroup.com
Associate Publisher
Michael Stephens
Acquisitions Editor
Todd Green
Development Editor
Tiffany Taylor
Managing Editor
Charlotte Clapp
Senior Project Editor
Matthew Purcell
Indexer
Larry Sweazy
Proofreader
Eileen Dennie
Technical Editors
Alan Moffet
Alan Wexelblat
Marc Goldford
Kunal Mittal
Publishing Coordinator
Cindy Teeters
Designer
Gary Adair
Contents at a Glance
Introduction 1
I Web Services Basics
1 Web Services Overview and Service-Oriented
Architectures 9
2 XML Primer 31
3 The SOAP Protocol 111
4 Describing Web Services 167
5 Implementing Web Services with Apache Axis 233
6 Discovering Web Services 307
II Enterprise Web Services
7 Web Services and J2EE 347
8 Web Services and Stateful Resources 383
9 Securing Web Services 445
10 Web Services Reliable Messaging 507
11 Web Services Transactions 525
12 Orchestrating Web Services 549
III Web Services in the Real World
13 Web Services Interoperability 609
14 Web Services Pragmatics 673
15 Epilogue:Web Services Futures 717
Appendix
A Glossary 731
Index 755
Table of Contents
Introduction 1
I Web Services Basics
1 Web Services Overview and Service-
Oriented Architectures 9
What Is a Web Service? 10
Business Perspective 11
Technical Perspective 12
Service-Oriented Architectures 13
Why Is SOA So Important? 15
SOA and Web Services: Related but Distinct 17
Trends in E-Business 17
Why Do We Need Web Services? 18
Scoping the Problem 18
Core Technologies 19
Industry Dynamics 20
What Makes a Good Web Service? 21
The Web Service Opportunity 22
Application Integration 22
B2B 24
Integration of Human Interaction with Systems:
B2C 24
Justifying Web Services 25
Web Services Interoperability Stack 26
Transport Layer 27
Messaging Layer 28
Description Layer 28
Quality of Experience Layer 29
Compositional Layer 29
Understanding the Web Services Interoperability
Stack 29
Summary 30
v
Contents
2 XML Primer 31
Document-Versus Data-Centric XML 32
Document-Centric XML 32
Data-Centric XML 33
Document Lifetime 34
XML Instances 35
Document Prolog 35
Elements 36
Attributes 38
Character Data 42
A Simpler Purchase Order 44
XML Namespaces 44
Namespace Mechanism 46
Namespace Syntax 47
Namespace-Prefixed Attributes 49
XML Schemas 51
Well-Formedness andValidity 51
XML Schema Basics 52
Associating Schemas with Documents 54
Simple Types 55
Complex types 59
The Purchase Order Schema 62
GlobalVersus Local Elements and Attributes 63
Basic Schema Reusability 64
Advanced Schema Reusability 70
There’s More 78
Processing XML 78
Basic Operations 78
Data-Oriented XML Processing 81
SAX-Based checkInvoice() 85
DOM-Based checkInvoice() 91
JAXB-Based checkInvoice() 96
Testing the Code 105
Summary 107
Resources 109
vi Contents
3 The SOAP Protocol 111
Simple Object Access Protocol (SOAP) 112
What Is SOAP, Really? 113
Doing Business with SkatesTown 114
Inventory Check Web Service 117
Choosing a Web Service Engine 117
Service ProviderView 117
Deploying the Service 118
The ClientView 118
A Closer Look at SOAP 120
The Structure of the Spec 120
The SOAP Messaging Framework 121
Vertical Extensibility 123
The mustUnderstand Flag 125
SOAP Modules 126
SOAP Intermediaries 126
The Need for Intermediaries 127
Transparent and Explicit Intermediaries 128
Intermediaries in SOAP 129
Forwarding and Active Intermediaries 130
Rules for Intermediaries and Headers 130
The SOAP Body 132
The SOAP Processing Model 132
Versioning in SOAP 133
Processing Headers and Bodies 134
Faults: Error Handling in SOAP 134
Structure of a Fault 135
Using Headers in Faults 138
Objects in XML:The SOAP Data Model 141
Object Graphs 141
The SOAP Encoding 143
The SOAP RPC Conventions 148
out and inout Parameters 149
XML, Straight Up: Document-Style SOAP 151
When to Use Which Style 151
vii
Contents
The Transport Binding Framework 152
Features and Properties 153
The HTTP Binding 157
The SOAPAction Feature 158
The Web Method Feature 159
Using SOAP to Send Binary Data 160
SOAP with Attachments and DIME 160
PASWA, MTOM, and XOP 162
Small-Scale SOAP, Big-Time SOAP 163
Summary 165
Resources 165
4 Describing Web Services 167
Why Service Descriptions? 167
Role of Service Description in a Service-Oriented
Architecture 168
Well-Defined Service 169
Functional Description 169
Nonfunctional Description 170
Description Summary 170
History of Interface Definition Languages (IDLs) 171
Web Services Description Language (WSDL) 173
WSDL Information Model 174
Parts of the WSDL Language 176
Structure of a WSDL Document:
Definitions 178
PortType 179
Operation 180
Message 180
Part 181
Types 184
Binding 186
Port 190
Service 191
Documentation 192
Import 192
Exploring More WSDL Features 195
viii Contents
Transmission Primitives 201
Rounding Out WSDL Bindings 205
WSDL Extension Mechanism 210
A Sketch of How WSDL Maps to Java 213
Nonfunctional Descriptions in WSDL 214
Policies 214
WS-Policy 216
Policy Assertions 220
Policy Attachments 220
Standardizing WSDL:W3C and WSDL 2.0 223
What’s New in WSDL 2.0 223
Overview of WSDL 2.0 224
A Complete WSDL 2.0 Description 229
Summary 230
Resources 231
5 Implementing Web Services with
Apache Axis 233
A Brief History of Axis 234
JAX-RPC, JAXM/SAAJ, and JAXB 234
Current State of the Project 235
Axis Architecture 236
Handlers and Chains: Concepts 236
Server-Side Message Processing 238
Client-Side Message Processing 240
The MessageContext and Its Many Uses 242
The Message APIs and SAAJ 243
A Message by Any Other Name 244
Accessing the SOAP Envelope, Bodies, and
Headers 244
The Axis Client APIs 246
The Service Object 246
Using the Call Object for Dynamic
Invocation 247
Using Stubs and WSDL2Java 253
Holders: Mapping inout/out Parameters
to Java 256
ix
Contents
Web Service Deployment Descriptor (WSDD) 258
Handler Declarations 259
Chain Definitions 260
Transports 261
Type Mappings 262
Building Services 263
Instant Deployment: JWS 263
WSDD for Services 264
Deploying Services and the AdminClient 267
Getting at the MessageContext 268
Service Lifecycle and Scopes 270
Sessions on the Server Side 272
Using WSDL2Java to Generate Services 272
Generating WSDL forYour Services 273
A Guide to Web Service Styles 275
RPC Style 275
Wrapped Style 276
Document Style 277
Message Style 278
From XML to Java and Back Again:The Axis Type-
Mapping System 279
Registering Mappings 279
Default Type Mappings 281
Default Type Mapping and XML/Java
Naming 283
Custom Serializers and Deserializers 284
Using the MessageElement
XML/Object APIs 286
When Things Go Wrong: Faults and Exceptions 288
The AxisFault Class 288
Using Typed Exceptions 289
Axis as an Intermediary 291
Reasons for Roles 291
How to Write a Handler 292
The SkatesTown EmailHandler 292
The SkatesTown GlobalHandler 295
x Contents
Built-in Security 297
Using the Authentication/Authorization
Handlers 297
Understanding Axis Transports 298
Client Transports 298
Server Transports 299
Transports Included with Axis 299
Custom Transports 300
No API Is an Island:Axis and Its Environment 300
Commons-Discovery and Obtaining
Resources 300
Logging Infrastructure 300
Security Providers 301
Compilers 301
Development/Debugging Tools 301
The happyAxis Page 301
Configuring Logging 301
Using tcpmon and SOAPMonitor 303
Axis Futures:A Quick Tour 304
Participating in the Axis Community 305
Summary 305
Resources 306
6 Discovering Web Services 307
What Is Service Discovery? 307
Role of Service Discovery in a Service-Oriented
Architecture 307
Service Discovery Mechanisms 308
Service Discovery at Design Time and
Runtime 309
Scenario Updates 310
UDDI (Universal Description, Discovery,
and Integration) 310
UDDI Datatypes 311
Using a UDDI Registry 325
What’s New in UDDIVersion 3.0 335
Using WSDL with UDDI 337
xi
Contents
Other Service Discovery Methods 343
WS-Inspection 343
WS-ServiceGroup 343
Summary 344
Resources 344
II Enterprise Web Services
7 Web Services and J2EE 347
J2EE Overview 347
Containers 348
Enterprise JavaBeans 348
Roles: Development,Assembly, and
Deployment 350
Benefits of Using Web Services with J2EE 351
J2EEVersions 353
Using EJBs from Axis 354
The Entity Bean 355
The Session Bean 358
The Deployment Unit 360
Exposing the EJBs via Axis 361
WebSphere Deployment Process 363
EJB Deployment 363
Configuring Axis to Invoke the
SkatesService Session Bean 367
EJB Wrap-Up 375
Using JSR109: Implementing
Enterprise Web Services 375
Step 1: Creating the WSDL File 376
Step 2: Creating the Deployment Descriptors
376
Step 3:Assembling the Application Files 378
Step 4: Enabling the EAR File for Web
Services 379
Step 5: Deploying the Application 379
JSR109 Client Code 380
JSR109 Wrap-Up 381
xii Contents
Summary 381
Resources 381
8 Web Services and
Stateful Resources 383
Web Services and State 384
Aspects of State 384
SkatesTown Scenario 385
WS-Resources 385
Stateful Resources 387
Cardinality of Web Services and
WS-Resources 387
Role of WS-Addressing 388
Implied Resource Pattern 391
Modeling Resource Properties 395
What Is a Resource Property? 395
WS-Resource Factory 399
Resource Property Operations 399
Rounding Out the POPortType 412
Using Notifications 412
Base Notification Concepts and Roles 413
Subscribing for Notification 415
The Subscription WS-Resource 419
Topics and Topic Spaces 420
Resource Properties of a Notification
Producer 428
The Other Notification Producer Operation:
GetCurrentMessage 429
Notification ofValue Changes on Resource
Properties 430
Notification Consumers 432
Notification Brokers 433
Resource Lifetime 434
Immediate Termination 435
Scheduled Termination 436
Initializing Termination Time 439
Notification of WS-Resource Termination 440
xiii
Contents
Other WS-Resource Framework Specifications 441
WS-RenewableReferences 442
WS-ServiceGroup 442
WS-BaseFaults 442
Summary 443
9 Securing Web Services 445
Example Scenario 445
Security Basics 446
Security Requirements 446
Cryptography 447
Authentication 450
Security Protocols 451
Security Infrastructures 452
Security Domains 455
Web Services Security 456
Security Model for Web Services 456
Web Services Security Specifications 458
Extended SkatesTown Security Scenario 459
WS-Security 461
Digital Signatures 462
Encryption 466
Security Tokens 471
WS-Trust 474
Public Key Infrastructure 474
Kerberos 476
XML Key Management Specification 479
WS-SecurityPolicy 481
WS-SecureConversation 482
WS-SecureConversation Overview 483
The SSL Protocol 486
Negotiation Protocol Example 487
WS-Federation 492
Enterprise Security 495
J2EE Security 495
Authorization in J2EE 496
J2EE and Web Services Security 498
xiv Contents
Security Services 500
Summary 502
Resources 502
10 Web Services Reliable Messaging 507
Background of the Web Services Reliable Messaging
Protocol (WS-RM) 507
The WS-RM Specification 509
WS-RM Processing Model 510
Client-Side Processing 511
Server-Side Processing 513
Sequence Faults 517
Policy Assertions 518
SpecVersion Assertion 519
DeliveryAssurance Policy 519
SequenceExpiration Policy 519
InactivityTimeout Assertion 520
BaseRetransmissionInterval
Assertion 520
AcknowledgementInterval Assertion 520
SequenceRef Element 520
Flaws and Other Thoughts on the WS-RM Spec 521
Putting WS-RM into Use 521
Summary 523
Resources 523
11 Web Services Transactions 525
Web Services Coordination and Transaction
(WS-C/Tx) 525
Transactions:A Brief Introduction 527
WS-Coordination 529
The CoordinationContext 530
The CreateCoordinationContext
Operation 530
The Register Operation 532
WS-Coordination Fault Codes 536
WS-Transaction:Atomic Transactions 536
WS-AT Operations 537
Commit and Rollback 537
xv
Contents
AT Protocols 538
Two-Phase Commit Protocols 538
Committing the Transaction 539
Transaction Flow Overview 543
Business Activity Protocol 544
Reliable Delivery and Security 545
Summary 546
Resources 547
12 Orchestrating Web Services 549
Why Are We Composing Web Services? 549
Two-Level Programming Model 550
Stateless and Stateful Web Services 550
Evolution of Business Process Languages 550
SkatesTown Requirements 551
Business Process Execution Language for
Web Services 552
Design Goals 553
External Interface of a Process 554
Overall Structure of a Process 558
Basic and Structured Activities 561
Process Lifecycle and Related Activities 562
Partner Links 563
Properties and Correlation Sets 565
Invoking Web Services and Providing Web
Services 568
Data Handling and Related Activities 572
More Basic Activities: wait, empty 575
Flows 576
More Structured Activities: sequence, while,
switch, scope 580
Fault Handling 582
Compensation Handling 585
Event Handling 587
SkatesTown: Putting It All Together 588
xvi Contents
Advanced Considerations 601
Abstract Processes 601
Language Extensibility 604
Summary 604
Resources 605
III Web Services in the Real World
13 Web Services Interoperability 609
Web Services Interoperability Organization 610
WS-I Basic Profile 1.0 611
Common Requirements for SOAP Envelope,
WSDL Document, and XML Schema
Document 619
Understanding the WSDL Document
Structure 620
Importing XML Schema and WSDL
Documents 622
Defining the Service Interface 623
Defining a SOAP Binding 626
Publishing a Service Description 637
HTTP and SOAP Message Content 638
Web Service Security 641
WS-I Conformance Claims 641
Service Provider, Requestor, and Registry
Requirements 643
Summary of Basic Profile 1.0 Requirements
645
Future WS-I Profiles 648
Basic Profile 1.1 648
Simple SOAP Binding Profile 1.0 649
Attachments Profile 1.0 650
Basic Security Profile 1.0 660
WS-I Sample Applications 661
WS-I Test Tools 663
Monitor Overview 663
Monitor Configuration File 665
xvii
Contents
Message Log File 665
Analyzer Overview 667
Analyzer Configuration File 667
Test Assertion Document 668
Profile Configuration Report 668
Summary 671
Resources 672
14 Web Services Pragmatics 673
Enterprise Adoption of Web Services 674
Time-Based Adoption Challenges 676
Inherent Limitations of SOA 677
Top-DownVersus Bottom-Up 679
Policies and Processes 682
Putting Web Services in Production 683
Web Services Technology Map 685
System Architectures for Web Services 691
Features, Capabilities, and Approaches 696
Tools and Platforms 696
SOA Testing 697
Deployment and Provisioning 699
Business Process Automation Using Web
Services 700
Operations 708
Summary 715
Resources 715
15 Epilogue:Web Services Futures 717
A Roadmap for Web Services 717
Age of Invention (Base SOAP,WSDL,
UDDI) 717
Age of Development (from Hype to
Delivery) 718
Age of Mainstream Acceptance (Web
Services Become Boring) 719
xviii Contents
Future Trends in Web Services 720
Short-Term Trends and Issues 720
Medium-Term Trends 723
Longer-Term Trends 727
Summary 729
A Glossary 731
Index 755
About the Authors
Steve Graham is a Senior Technical Staff Member in IBM’s Systems Group and a
member of the IBM Academy of Technology. Steve is an architect in the On Demand
Architecture group. He has spent the last several years working on service-oriented
architectures as part of IBM’s Web Services Initiative and IBM’s On Demand Initiative.
Most recently, Steve has applied service-oriented concepts to problems in Grid comput-
ing as part of the Open Grid Services Architecture work in the Global Grid Forum.
Prior to this, Steve worked as a technologist and consultant with various emerging tech-
nologies such as Java and XML, and before that he was an architect and consultant with
the IBM Smalltalk consulting organization. Before joining IBM, Steve was a developer
with Sybase, a consultant, and a faculty member in the Department of Computer
Science at the University of Waterloo. Steve holds a BMath and MMath in computer
science from the University of Waterloo and an MBA from the Kenan Flagler Business
School at University of North Carolina, Chapel Hill.
Doug Davis works as an architect in the Emerging Technology organization of IBM.
Previous activities include being the technical lead of IBM’s Emerging
Technologies/Web Services Toolkit, being one of IBM’s representatives in the W3C
XML Protocol working group, and working on WebSphere’s Machine Translation proj-
ect,TeamConnection, and IBM’s FORTRAN 90 compiler. Doug has a bachelor of sci-
ence degree from the University of California at Davis and a master’s degree in comput-
er science from Michigan State University.
Simeon Simeonov is a Principal at PolarisVenture Partners in Boston, where he helps
early-stage IT companies accelerate their growth. Prior to joining Polaris, Sim wasVice
President of Emerging Technologies and Chief Architect at Macromedia. Earlier, Sim was
a founding member and Chief Architect at Allaire. Sim has played a key role in eight
v1.0 product initiatives. His innovation and leadership have brought about category-
defining products with significant market impact: the first Web application server (Allaire
ColdFusion), the best open-source Web services engine (Apache Axis) and the first rich
Internet application platform (Macromedia Flash/Flex). Sim has been working with
XML and precursors to Web services since 1997 and has developed standards in this
space at W3C, JCP, and OASIS. Sim has a master’s degree in computer science from
Boston University and bachelor’s degrees in computer science, economics, and mathe-
matics from Macalester College.
Glen Daniels is the Standards Strategist for Sonic Software, creator of the first
Enterprise Service Bus. Glen bridges the gap between Sonic’s development organization
and the evolving world of standards. He is one of the primary designers and developers
for the Apache Axis project, is a member of the Apache Software Foundation, and partic-
ipates actively in organizations like the W3C, OASIS, and the JCP. Prior to Sonic, he was
a principal software engineer at Macromedia and Allaire, where he architected new ini-
tiatives and helped to bring the company into the Web services era.When not at stan-
dards meetings or writing code, he enjoys playing music, cooking, and spending time
with his friends, his family, and his two amazing cats.
Peter Brittenham is a Senior Technical Staff Member working in the IBM Emerging
Technology group. Peter is currently an architect applying service-oriented architecture
concepts to IBM’s Autonomic Computing initiative. Prior to this, he was the lead archi-
tect for the IBM Web Services Toolkit, which provided a preview of emerging Web serv-
ice technologies. Peter also was one of the IBM representatives to the Web Services
Interoperability (WS-I) organization. In this role, he was responsible for the architecture
and overall development of the first release of the Java version of the WS-I Test Tools.
Peter has a BS in business administration from Boston University and an MS in comput-
er science from Marist College.
Yuichi Nakamura leads the XML & Security group at the IBM Tokyo Research
Laboratory. He joined IBM in 1990 and has worked in several areas such as object-
oriented systems, multi-agent systems, B2B e-commerce, and knowledge engineering.
Since 1999 he has been working on Web services, addressing security, caching, and per-
formance.Yuichi contributed to the Apache Axis project during its start-up phase, and he
has been contributing to the development of security and cache components for IBM’s
WebSphere Application Server. He received an MSc and a PhD in applied physics from
Osaka University.
Paul Fremantle is a Senior Technical Staff Member in IBM’s Software division, based in
the Hursley Park laboratory near Winchester in England. Paul works on IBM’s
Enterprise Service Bus initiative and other Web services activities in the WebSphere
product. Paul has been working on Web services and XML at IBM since 1999, when he
wrote early XML utilities for IBM’s alphaWorks website. Since then he has co-authored
The XML Files, an IBM redbook, as well as a number of articles on J2EE and Web serv-
ices both in print and on the Web. Paul’s involvement on the WebSphere Application
Server includes architectural responsibility for the first SOAP support, the Web Services
Invocation Framework, and the Web Services Gateway. Paul is the co-lead of the JWSDL
standard in the Java Community Process and has initiated two open-source projects. Paul
has an MSc in computation and an MA in mathematics and philosophy, both from
Balliol College, Oxford.
Dieter König is a software architect for workflow systems at the IBM Germany
Development Laboratory. He joined the laboratory in 1988 and has worked on
Resource Measurement Facility for z/OS, MQSeries Workflow, and WebSphere Process
Choreographer. Dieter is a member of the OASIS WS-BPEL Technical Committee,
which is working toward an industry standard based on the Business Process Execution
Language for Web Services (BPEL4WS) specification. He holds a master’s degree
(Dipl.inform.) in computer science from the University of Bonn, Germany.
Claudia Zentner is an architect working for IBM’s Software Group at the IBM
Development Laboratory in Böblingen, Germany. Since joining IBM in 1989, she has
worked on various middleware projects. For many years Claudia has been focusing on
workflow, starting with FlowMark and MQSeries Workflow; currently she is an architect
for the process choreography component of the WebSphere Business Integration offer-
ing. Claudia graduated in computer science from the University of Cooperative
Education in Stuttgart, Germany.
Acknowledgments
Steve Graham
Once again, to Karen, Erin, and Jessie, my family, my inspiration. For all the moments
sacrificed to create this book, my most heartfelt thanks for your understanding. My
thanks to my co-workers at IBM for providing an excellent environment for creative
work.
My thanks also to the staff at Sams, particularly Tiffany Taylor and Michael Stephens,
for the hard work that went into making this project a reality.
Romans 12:2.
Doug Davis
Thanks to my parents, family, and friends, without whose support and guidance none of
the joys in my life would be possible. Lin—thanks to your never-ending patience and
understanding, we managed to make it through another one! Sorry for forcing you to
learn far more about Web services than you ever feared. :-)
Sim Simeonov
As always, my deepest thanks to Pyrra: my true love and a constant source of inspiration.
Second editions are not easy when the topic of writing is changing as fast as Web servic-
es are evolving.Thanks go to all that helped me keep my finger on the pulse of the
industry, notably, the good people working with Web services at Service Integrity,
WebLayers, Orbitz,Amazon.com, eBay, CA, BMC, IBM, BEA, Microsoft, ZapThink,
Burton Group,AT&T, GE, Ford, Bank of America,Wachovia, Fidelity, Morgan Stanley,
Merck, and Web Services Journal.
Many thanks to Tiffany,Todd, and Mike at Sams for supporting us all the way!
Glen Daniels
I would like to thank my friends and family (not to mention the rest of the authoring
team) for putting up with my overloaded schedule, and everyone at Sams for their great
work pulling the book together.Also thanks to all the readers of the first edition who’ve
made great comments and suggestions—we hope you like the new one!
Peter Brittenham
To my wife Abby, and my children Josh, Greg, and Jessica, thank you for your continued
patience and support.
Yuichi Nakamura
To my wife Michiyo, my daughter Arisa, and my son Ryotaro.Thank you for your sup-
port and patience. My thanks to my colleagues at IBM for providing this great environ-
ment to work on Web services.
My thanks also to the staff at Sams,Tiffany,Todd, and Mike. Particularly, I thank
Tiffany for her English editing on my chapter.
Paul Fremantle
To Jane, for being my supporter, friend, and advocate and making me laugh.To my chil-
dren Anna and Dan for keeping me sane and driving me crazy.Thanks to my colleagues,
especially Sanjiva Weerawarana,Tony Storey, Beth Hutchison, and Chris Sharp, for mak-
ing my working environment challenging and fun, and to John Carter for being a great
manager while I wrote this book. Finally, thanks to Tiffany,Todd, and Mike at Sams for
all their hard work, and to Steve for all his encouragement to us all.
Dieter König
To my wife Rita and my sons Daniel, Sebastian, Maximilian, and Jonas.Thank you for
your patience and support during this adventure.
Claudia Zentner
To Anneliese, Christian, Marion, and all my friends, thanks for your support and
patience.
We Want to Hear from You!
As the reader of this book, you are our most important critic and commentator.We value
your opinion and want to know what we’re doing right, what we could do better, what
areas you’d like to see us publish in, and any other words of wisdom you’re willing to
pass our way.
As an associate publisher for Sams Publishing, I welcome your comments.You can
email or write me directly to let me know what you did or didn’t like about this
book—as well as what we can do to make our books better.
Please note that I cannot help you with technical problems related to the topic of this book.We
do have a User Services group, however, where I will forward specific technical questions related to
the book.
When you write, please be sure to include this book’s title and author as well as your
name, email address, and phone number. I will carefully review your comments and share
them with the author and editors who worked on the book.
Email: feedback@samspublishing.com
Mail: Michael Stephens
Associate Publisher
Sams Publishing
800 East 96th Street
Indianapolis, IN 46240 USA
For more information about this book or another Sams Publishing title, visit our Web
site at www.samspublishing.com.Type the ISBN (excluding hyphens) or the title of a
book in the Search field to find the page you’re looking for.
Building Web Services With Java Making Sense Of Xml Soap Wsdl And Uddi 2nd Edition 2nd Edition Steve Graham
Introduction
WELCOME TO THE WORLD OF WEB SERVICES! Web services is an evolving collection
of standards, specifications, and implementation technologies that are showing great value
in the world of application integration and distributed computing.Web services continue
to evolve to address more sophisticated computing scenarios, and the authors of this
book are excited to bring you into what is widely believed to be the next generation of
distributed computing.
Before we get going, we need to clarify some things about the purpose and structure
of the book. Let’s talk about them now.
Goals of This Book
The overall goal of this book is to familiarize you with the concept of Web services and
what it will take to incorporate Web services as part of your business.We’ll introduce the
concept of Web services and give you a framework that describes how you can under-
stand the various standards associated with Web services, such as Simple Object Access
Protocol (SOAP),Web Services Description Language (WSDL), and Universal
Description Discovery and Integration (UDDI).We’ll help position Web services from a
business and technical perspective, explaining and demonstrating how Web services can
be used to address various business problems.
Another goal of this book is to help developers understand the issues and details relat-
ed to building Web services using the techniques covered by this book.What pieces are
required when you’re planning a Web services strategy? What things do you need to take
care of when you’re developing Web services? We provide lots of examples to demon-
strate these approaches.We also review in detail the Apache Axis Web services infrastruc-
ture with our examples.
Assumed Background
This book is meant for computing technical professionals with some experience building
Web applications and distributed computing systems.You don’t need to be a seasoned
veteran of the distributed object wars to appreciate this book, but some familiarity with
Web-based architectures and techniques such as HTTP and HTML is assumed. If you
don’t have any experience with these techniques, some of the material could be a little
confusing—particularly some of the code examples—but you should still be able to get a
lot out of the book.
2 Introduction
We assume you’re familiar with Java, in particular the Java servlet technology.We also
briefly discuss the relationship between Enterprise JavaBeans (EJBs) and Web services, so
some familiarity with EJBs is helpful as well. If you need to supplement your under-
standing of these techniques, many good books on programming with Java, JSP, servlets,
and EJBs are available on the market.
You’ll also discover that the Extensible Markup Language (XML) is at the core of all
things dealing with Web service.Although we devote an entire chapter to explaining the
core pieces of XML needed to build Web services, the more understanding of XML you
have, the more successful you’ll be in building Web services.
Philosophy
The concepts and standards involved in Web services are very much interdependent. It’s
difficult to cover each topic in isolation, because it’s the combination of these concepts
and standards that makes Web services important to distributed computing.
The philosophy of this book can be summarized by four points: pragmatics, progres-
sive disclosure, a continuous example, and a service-oriented architecture framework.
Pragmatics
In this book, we try to get to programming examples and running code as quickly as
possible. In particular, we focus on building and consuming SOAP-based Web services
using the Java-based Apache Axis Web services infrastructure.Whereas we emphasize that
Web services are fundamentally programming language neutral, ultimately, any given
Web service is implemented in some programming language technology. In the case of
this book, we’ve chosen Java—probably not a surprise to you, given our title.Where
issues of interoperability with Web services written in other programming languages
appear, we note them. Detailed coverage of other Web services implementation
approaches, such as Microsoft’s .NET, is beyond the scope of this book.
Progressive Disclosure
After an overview of Web services, we start with the fundamentals of XML and then
layer on new concepts, motivated by a business computing problem.These layers
produce a series of Web services technology stacks. For each of the technologies and
standards in the Web services arena, we focus on explaining the technology from the
perspective of the problems it solves, balancing the explanation of the technology itself.
Business Example
The technologies and standards that make up the Web services concept are each exam-
ined in the context of an example (which we discuss later in this introduction).The use
of the example adds insight to the explanation of Web services in the text of the book
and supports the progressive disclosure approach as we follow the example, adding the
3
Introduction
layers of Web services technology to the solution.This technique helps position various
best-practices approaches to Web service development and deployment.You can down-
load the source code for these running examples from www.samspublishing.com.When
you reach that page, enter this book’s ISBN number (0672326418) in the search box to
access information about the book and a Downloads link.
Service-Oriented Architecture
The examples and Web services concepts are discussed in the context of Service-
Oriented Architecture (SOA), which we introduce in Chapter 1,“Web Services
Overview and Service-Oriented Architectures.”We use the SOA framework to help
position the various Web services concepts in the context of a bigger picture.
Overview of the Book’s Composition
This book is divided into three major parts:“Web Services Basics,”“Enterprise Web
Services,” and “Web Services in the Real World.” Chapters 1 through 6 describe the core
concepts of Web services; you need to have a thorough understanding of this subject
matter to be successful with any Web services development project. Chapters 7 through
12 are organized around Web services topics that have an enterprise computing focus.
The topics discussed in this section address technical subjects that usually crop up when
you’re building “real” information technology solutions.The last part of the book,
Chapters 13 through 15, deals with development pragmatics that we’ve gleaned from
real-world experience with Web services. Let’s take a closer look at the topics in each of
the chapters.
Chapter 1 begins the book with an explanation of what the Web services approach is
all about.We describe what a Web service is, what standards and technologies are associ-
ated with Web services, and what problems can be solved using Web services.We use this
chapter to introduce the Service-Oriented Architecture (SOA) conceptual framework
and begin to explain how the various Web services standards such as SOAP,WSDL, and
UDDI fit together.This chapter will give you a solid conceptual basis for the rest of the
book.
Before we can get into the core Web services standards, we take a brief side trip to
explain XML in Chapter 2,“XML Primer.” Because XML is at the heart of all the Web
services standards and techniques, it’s important for you understand it well. XML is a
huge topic, but we focus our examination of XML on what you’ll need to know in
order to understand the rest of the Web services topics.
After the review of XML, Chapter 3,“The SOAP Protocol,” dives in to the core
mechanism of invoking a Web service.We review the topic of XML messaging in a dis-
tributed computing environment, focusing on the SOAP messaging standard from the
W3C. SOAP forms the core basis of communication between a service requestor and a
service provider in a Web services environment, and it’s the foundation on which you
can build the kinds of business-level extensions we’ll discuss later in the book.
4 Introduction
Chapter 4,“Describing Web Services,” introduces the important notion of service
description, which is key to making Web services a great application integration technol-
ogy for building loosely coupled systems.This chapter discusses how Web services use
service description to address the problem of communicating the details the service
requestor needs to know about the Web service in order to properly understand how
(and why) to invoke it.
Chapter 5,“Implementing Web Services with Apache Axis,” refines your understand-
ing of SOAP in the context of a particular SOAP infrastructure: the Apache Axis project.
This chapter dives into the details of how Axis works and how you can use it to both
consume Web services and deploy your own.
Now, you need to understand how the service requestor got the service description
in the first place. Chapter 6,“Discovering Web Services,” picks up where Chapter 4 left
off, discussing the various techniques for Web service discovery, such as UDDI.This
chapter examines the standards related to finding what Web services are provided by
businesses with which a company might want to collaborate.
Chapter 7,“Web Services and J2EE,” adds detail to the core concepts introduced in
Chapters 1 through 6.This chapter explains how the Web services concepts map to Java
2 Enterprise Edition (J2EE). Chapter 7 explains how to build Web services using Axis
and using the JSR109 Java standard.
In Chapter 8,“Web Services and Stateful Resources,” we review how the notion of
stateful resources can be combined with Web services, by introducing the concepts of
WS-Addressing, a referencing or pointer mechanism in Web services;WS-Resource
Framework, a specification for associating Web services with stateful resources; and WS-
Notification, a mechanism for doing publish-subscribe style of asynchronous messaging.
This work is an emerging standard for use in Grid computing and systems management
as well as e-business computing. (For more information on Grid computing, we recom-
mend that you browse www.globalgridforum.org.)
The very important issue of Web services security is discussed in Chapter 9,“Securing
Web Services.”This chapter reviews existing security technologies and takes a closer look
at the mapping from Web services security to those technologies.This chapter also
reviews how Web services security technologies are integrated into enterprise applica-
tions using the J2EE model.
In many applications, it’s critical to verify whether a message is sent or received by
another party. Chapter 10,“Web Services Reliable Messaging,” explores a Web services
specification that was written to try to overcome certain problems with Web services by
adding a reliability aspect to SOAP.
Chapter 11,“Web Services Transactions,” examines how Web services deal with trans-
actions. In an enterprise setting, it’s likely that Web services will need to be invoked and
coordinated under the scope of a single unit of work. In this chapter, we examine a
group of specifications that describe how to do this with Web services.
Web services allow designers to build applications that more closely resemble the
business processes they automate. Chapter 12,“Orchestrating Web Services,” describes
how to build Web services by coordinating or orchestrating simpler Web services into a
5
Introduction
business process (which is also a Web service).This chapter introduces the Business
Process Execution Language for Web Services (BPEL4WS) specification.
Chapter 13,“Web Services Interoperability,” explores the Do’s and Don’ts of building
Web services that interoperate with other Web services.The Web Service Interoperability
(WS-I) Organization has developed a series of guidelines that help developers use the
Web services specifications in a consistent way across vendors.This chapter examines the
work of this organization.
Chapter 14,“Web Services Pragmatics,” deals with a list of issues that you may
encounter when you’re building and deploying Web services in the real world.
Chapter 15 provides a forward-looking epilogue,“Web Services Futures,” which spec-
ulates on some possible future uses of Web services technologies.
Note
This book introduces quite a few terms with which you might not be familiar. We’ve included a glossary at
the back of the book that acts as a great reference guide to the terminology we use. We’ll annotate the first
use of each term appearing in the glossary using the g symbol.
Introducing SkatesTown
Before we get started, let’s introduce the fictional company we’ll use for our examples
throughout this book: SkatesTown.We’ll follow SkatesTown as the company exploits
Web services to improve its business.
SkatesTown is a small but growing business in NewYork that was founded by three
mechanically inclined friends with a passion for skateboards.They started by designing
and selling custom prebuilt boards out of Dean Carroll’s garage, and word soon spread
about the quality of their work.They came up with some innovative new construction
techniques, and within months they had orders piling up. Now SkatesTown has a small
manufacturing operation in Brooklyn, and the company is selling boards, clothing, and
equipment to stores around the city. Dean, Frank Stemkowski, and Chad Washington
couldn’t be happier about how their business has grown.
Of the three, Chad is the real gearhead, and he has been responsible for most of the
daring construction and design choices that have helped SkatesTown get where it is
today. He’s the president and head of the team. Frank, gregarious and a smooth talker
ever since childhood, now handles marketing and sales. Dean has tightly tracked the
computer revolution over the years, and he’s chief technical officer for the company.
A few years back, Dean realized that networking technology was going to be big, and
he wanted to make sure that SkatesTown could catch the wave and utilize distributed
computing to leverage its business.This focus turned out to be a great move.
Dean set up a Web presence so SkatesTown could help its customers stay up to date
without requiring a large staff to answer phones and questions. He also built an online
order-processing system to help streamline the flow of the business with
6 Introduction
network-enabled clients. In recent months, more and more stores who carry SkatesTown
products have been using the system to great effect.
Our Story Begins
At present, Dean is pretty happy with the way things are working with SkatesTown’s
electronic commerce systems. But there have been a few problems, and Dean is sure that
the systems could be even better. He realizes that as the business grows, the manual tasks
associated with order gathering and inventory resupply will limit the company’s success.
Always one to watch the horizon, Dean has heard the buzz about Web services, and he
wants to know more.At the urging of a friend, he got in touch with Al Rosen, a con-
tractor for Silver Bullet Consulting (SBC). Silver Bullet specializes in Web services solu-
tions, and after a couple of meetings with Al, Dean was convinced—he hired SBC to
come in, evaluate SkatesTown’s systems, and help the company grow into a Web
service–enabled business.
As we move through the rest of the book, we’ll keep an eye on how SkatesTown uses
technologies like XML and, later, SOAP,WSDL, UDDI, and the rest of the Web services
stack to increase efficiency and productivity, and establish new and valuable relationships
with its customers and business partners. Silver Bullet, as you’ll see, usually lives up to its
name.
I
Web Services Basics
1 Web Services Overview and Service-Oriented Archectures
2 XML Primer
3 The SOAP Protocol
4 Describing Web Services
5 Implementing Web Services with Apache Axis
6 Discovering Web Services
Building Web Services With Java Making Sense Of Xml Soap Wsdl And Uddi 2nd Edition 2nd Edition Steve Graham
1
Web Services Overview and
Service-Oriented Architectures
OKAY, ENOUGH WITH THE HYPE. Some have said that Web services promised to be
everything to everyone, but clearly that isn’t going to happen.Where is the business ben-
efit behind the Web services technologies? That’s what this book will attempt to explain,
in the context of exploring the technologies themselves. Several things do seem to be
true:
n According to many industry analyst reports,Web services are being used by the
vast majority of Fortune 500 businesses.
n Web services technology promises to help small and medium businesses participate
more effectively in supply chains of large organizations.
n Information technology (IT) vendors have adopted Web services (more or less) as a
major part of their software strategy.
n The Web services industry is dominated by standards activities, minimizing the
likelihood of the technology being dominated by a single vendor.
That being said, several concerns remain:
n Widespread adoption, particularly after several pilot projects are completed, has
been slow to happen. Some people speculate that the business climate after 2000
was too conservative, and the dot-com bubble made businesses shy of shiny new
technology.
n Standards are being developed, but this is happening at a majestic (slow) pace.
Tooling and runtime support will follow, but when? Security standards have just
recently been finalized, and infrastructure products supporting those standards have
yet to be ubiquitously deployed.Additional concerns are lack of finalized reliable
messaging and transaction standards. Some analysts claim that the Web services
hype wasn’t about the technology’s promise (it’s well positioned to deliver value),
10 Chapter 1 Web Services Overview and Service-Oriented Architectures
but rather about the rate and pace of its maturity: It’s a lot harder to get industry
standards adopted than it’s to drive proprietary technologies.
n Best practices are slow in coming.Without a good base of solid implementation
experience, there will continue to be a lot of thrashing around as businesses figure
out what to use this technology for.
n Business process design is just beginning to take a service-oriented approach. Until
this happens, many powerful benefits of Web services won’t be realized.
So how can we move forward? We talk about adoption pragmatics toward the end of the
book, in Chapter 14,“Web Services Pragmatics”; until then, it’s important for developers
to understand the individual technologies and standards that make up the Web services
landscape. Discussing these technologies in the context of a scenario, like the SkatesTown
scenario we return to throughout the book, is one excellent way to get a basic under-
standing of Web services.After you learn the basic concepts, technology, and terminolo-
gy, the next step is for you to implement, practice, summarize, and discuss.
In this chapter, we’ll provide the basic terminology and set of concepts that put the
remainder of the book into context.We’ll define what we mean by a Web service g and
describe situations in which Web services play an important role.We’ll describe a simple
framework, called service-oriented architecture g, which helps structure the application of
Web services technologies.We’ll also provide a framework, in the form of an “interoper-
ability” stack that positions how the various Web services technologies including SOAP
g, Web Services Description Language (WSDL) g, and Universal Description Discovery
and Integration (UDDI) g relate.The rest of the book, then, is an elaboration of the
basic concepts presented here.
What Is a Web Service?
This is a book about building Web services.We can’t describe how to build a Web serv-
ice without first clarifying what we mean by Web service.
Web services have gained a lot of momentum since the term was introduced in the
year 2000. Many software vendors (large and small) have Web services initiatives and
products. In fact, some vendors are in the second or third version of their Web services
product offerings! Many organizations are involved in the refinement of Web services
standards. Early in the evolution of Web services there seemed to be a slow convergence
toward a common understanding of what the term means—there was no single, univer-
sally adopted definition of what is meant by the term Web service.This situation was rem-
iniscent of the early days of object-oriented programming: Not until the concepts of
inheritance, encapsulation, and polymorphism were well defined did object-oriented
programming become accepted into the mainstream of development methodologies.
Several major Web services infrastructure providers published their definitions for a
Web service.And through the process of open standards development, a commonly
accepted term emerged.The Web services Architecture working group of the World Wide
11
What Is a Web Service?
Web Consortium g (W3C, which manages the evolution of the SOAP and WSDL spec-
ifications) developed the following definition for a Web service:
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 stan-
dards.
One important point is that a Web service need not necessarily exist on the World Wide
Web.This is an unfortunate historical naming issue.A Web service can live anywhere on
the network, Inter- or intranet. In fact,Web services have little to do with the browser-
centric, HTML-focused World Wide Web. (Sometimes the names we choose in the IT
industry don’t make a lot of sense; they simply take on a life of their own.)
Another important point is that a Web service’s implementation and deployment plat-
form details aren’t relevant to a program that’s invoking the service.A Web service is
available through its declared API and invocation mechanism (network protocol, data
encoding schemes, and so on).This is analogous to the relationship between a Web
browser and a Web application server:Very little shared understanding exists between the
two components.The Web browser doesn’t care if the Web application server is Apache
Tomcat, Microsoft Internet Information Services Server, or IBM WebSphere.The shared
understanding is that they both speak HTTP and converse in HTML or a limited set of
MIME types. Similarly, the Web application server doesn’t care what kind of client is
using it—various brands of Web browsers or even non-browser clients.This minimal
shared understanding between components allows Web services to form a system of
loosely coupled components.
Business Perspective
Web services have become an important concept for business people; they’re quickly
becoming a significant part of a business IT strategy.The vast majority of the Fortune
500 has already adopted Web services in some fashion.Although Web services–based sys-
tems are mainly deployed for internal application purposes, a growing minority (around
40–50% according to recent surveys) of companies are beginning to use Web services
with their customers, suppliers, and business partners.
To a business person, the Web services approach is all about integration: integrating
application functionality within an organization or integrating applications between busi-
ness partners (in a supply chain, for example).The scenario in this book illustrates this
approach.Application integration allows time and cost efficiencies for receiving purchase
orders, answering status inquiries, processing shipment requests, and so on.The important
point is that application integration is enabled without tight lock-in to any particular
business partner. If another supplier has better prices, shipping terms, or quality assur-
ance, then a company’s reorder systems can be easily repositioned to use that supplier;
12 Chapter 1 Web Services Overview and Service-Oriented Architectures
doing so is as easy as pointing a Web browser at a different Web site.With a broader
adoption of Web services and XML document format standards, this style of dynamic
business partner integration will become more broadly used.The Web services technolo-
gy has become so important in business that it’s even appearing in business school cur-
riculums. One of the authors of this book recently completed an MBA degree; Web
services were featured in several of the courses!
The systems integration thought isn’t new.The IT industry has offered numerous
integration technologies; many were proprietary, some were based on open standards.
Web services reflect the application of a trend broadly accepted in the IT community:
adoption of open standards.With Web services acting as a ubiquitous integration infra-
structure supported by most organizations, the task of building cross-organizational
information systems (such as a supply chain) becomes much easier and less expensive.
When systems are easy and inexpensive to integrate, an organization’s reach to suppli-
ers, customers, and other business partners is extended, yielding cost savings, flexible
business models, better customer service, higher customer retention, and so on.This fact
is driving change in the way organizations think about building IT systems, particularly
those involving integration of existing software programs and those of suppliers, cus-
tomers, and business partners. Just as IT is fundamental to the efficient operations of an
organization,Web services–based systems integration will be fundamental to flexible,
lightweight systems integration—for internal application integration within an organiza-
tion over an intranet and external partner integration over the Internet or extended vir-
tual private network.
So, from a business perspective, a Web service is a business process or step within a
business process that is made available over a network to internal and/or external busi-
ness partners to achieve a business goal.The key is ease of integration, particularly
between organizations, allowing business systems to be built quickly by combining Web
services built internally with those of business partners.
Technical Perspective
From a technical perspective, a Web service is nothing more than a collection of one or
more related operations that are accessible over a network and are described by a service
description.At this level, the Web services concept isn’t new.With Web services, the IT
industry is trying to address the fundamental challenge of distributed computing that has
been around for decades: locating and accessing remote components.The big difference
is that now the industry is approaching this problem using open technology (XML and
Internet protocols) and open standards managed by broad consortia such as OASIS g
and the W3C.
The role of loose coupling can’t be overemphasized. Instead of building an application
as a collection of tightly coupled components or subroutines, all of which are well
known to the developer at coding time, the Web services approach is much more
dynamic.The focus with Web services is on the interface: the contract between a Web
service and the component invoking it. Of course, this approach isn’t new; what is new
13
Service-Oriented Architectures
is the way that Web services combine the loosely coupled component-based approach to
software development with the lessons learned from the World Wide Web—particularly
the important role of simple, open standards to achieve ubiquitously deployed infrastruc-
ture capabilities.
Service-Oriented Architectures
Early in the Web services technology evolution, we noticed a pattern that we called
service-oriented architecture (SOA). SOA is a simple concept, which makes it applicable to a
wide variety of Web services situations.
In an SOA, all software components (or functional units that are visible for other
entities to invoke or consume over the network) are modeled as services.That is, the
architectural premise is that all business tasks or business processes that are built in soft-
ware are designed as services to be consumed over a network.
In an SOA, the focus of design is the service’s interface.This is similar to component-
based software engineering approaches we’ve seen. However, a major difference is that
the focus of application design is shifted to composing services invoked over a network.
In the SOA approach, the designer isn’t building a program, a functional unit for one
purpose/use only; rather, they’re building a service that has a well-defined interface and
that can potentially be used in multiple business contexts.
Because SOA is focused on building applications using components with well-defined
interfaces, it allows applications to be loosely coupled.Applications are integrated at the
interface (contract) level, not at the implementation level.This allows greater flexibility,
because applications are built to work with any implementation of a contract, not to take
advantage of a feature or idiosyncrasy of a particular implementation. For example, dif-
ferent service providers (of the same interface) can be dynamically chosen based on poli-
cies (such as price, other QoS guarantees, current transaction volume, and so on).
Figure 1.1 depicts the main roles and operations in an SOA.Any service-oriented
architecture contains three roles: a service requestor g, a service provider g, and a service
registry g:
n A service provider is responsible for creating a service description g, deploying that
service in a runtime environment that makes it accessible by other entities over the
network, publishing that service description to one or more service registries, and
receiving Web service invocation messages from one or more service requestors.A
service provider, then, can be any company that hosts a Web service made available
on a network.You can think of a service provider as the “server side” of a client-
server relationship between the service requestor and the service provider.
n A service requestor is responsible for finding a service description published to one
or more service registries and is responsible for using service descriptions to bind
to or invoke Web services hosted by service providers.Any consumer of a Web
service can be considered a service requestor.You can think of a service requestor
as the “client side” of a client-server relationship between the service requestor and
the service provider.
14 Chapter 1 Web Services Overview and Service-Oriented Architectures
n The service registry is responsible for advertising Web service descriptions published
to it by service providers and for allowing service requestors to search the collec-
tion of service descriptions contained within the service registry.The service reg-
istry role is simple: to be a matchmaker between service requestor and service
provider. Once the service registry makes the match, it’s no longer needed in the
picture; the rest of the interaction takes place directly between the service
requestor and the service provider for the Web service invocation.
Service
Registry
Service
Requestor
Service
Provider
Bind
Find Publish
Figure 1.1 Service-oriented architecture
Each of these roles can be played by any program or network node. In some circum-
stances, a single program might fulfill multiple roles; for example, a program can be a
service provider, providing a Web service to downstream consumers, as well as a service
requestor, itself consuming Web services provided by others.
An SOA also includes three operations: publish g, find g, and bind g.These
operations define the contracts between the SOA roles:
n The publish operation is an act of service registration or service advertisement. It
acts as the contract between the service registry and the service provider.When a
service provider publishes its Web service description to a service registry, it’s
advertising the details of that Web service to a community of service requestors.
The details of the publish API depend on how the service registry is implement-
ed. In certain simple or direct publish scenarios, the service registry role is played by
the network itself, with publish being an act of moving the service description
into a Web application server’s directory structure. Other services registry imple-
mentations, such as UDDI, define a sophisticated implementation of the publish
operation.
n The find operation is the logical dual of the publish operation. It’s the contract
between a service requestor and a service registry.With the find operation, the
service requestor states a search criteria, such as type of service, various other
aspects of the service such as quality of service guarantees, and so on.The service
15
Service-Oriented Architectures
registry matches the find criteria against its collection of published Web service
descriptions.The result of the find operation is a list of service descriptions that
match the find criteria. Of course, the sophistication of the find operation varies
with the implementation of the service registry role. Simple service registries can
provide a find operation with nothing more sophisticated than an unparameterized
HTTP GET.This means the find operation always returns all Web services pub-
lished to the service registry, and it’s the service requestor’s job to figure out which
Web service description matches its needs. UDDI, of course, provides extremely
powerful find capabilities.
n The bind operation embodies the client-server relationship between the service
requestor and the service provider. It can be quite sophisticated and dynamic, such
as on-the-fly generation of a client-side proxy based on the service description
used to invoke the Web service; or it can be a static model, where a developer
hand-codes the way a client application invokes a Web service.
The key to SOA is the service description. It’s the service description that is published
by the service provider to the service registry. It’s the service description that is retrieved
by the service requestor as a result of the find operation. It’s a service description that
tells the service requestor everything it needs to know in order to bind to or invoke the
Web service provided by the service provider.The service description also indicates what
information (if any) is returned to the service requestor as a result of the Web service
invocation.
Each time an SOA is deployed, different technologies may fulfill each role. Chapter
6,“Discovering Web Services,” discusses various options for implementing a service reg-
istry and goes into great detail on the UDDI service registry technology. Chapter 4,
“Describing Web Services,” discusses service description in detail. Chapters 3 and 5,“The
SOAP Protocol” and “Implementing Web Services with Apache Axis,” focus on the use
of SOAP to fulfill the bind operation. Chapter 9,“Securing Web Services,” discusses how
to make Web services more secure. Chapters 10 and 11,“Web Services Reliable
Messaging” and “Web Services Transactions,” describe how to make invoking Web serv-
ices reliable and transactable. In Chapter 12,“Orchestrating Web Services,” you’ll learn
how to build applications by stitching services together using a workflow technique.
The choices of which techniques to use are driven by business needs. How secure
does a Web service invocation need to be? There is a price to pay for security (in com-
plexity and performance); sometimes it’s worth paying, and other times the risk doesn’t
warrant the cost. Is reliable message delivery important? For some Web services invoca-
tions, it clearly is; for others, it isn’t obvious that the complexity and the performance
price are warranted.The same is true for transactions and the other Web services capabil-
ities discussed in this book.
Why Is SOA So Important?
SOA is an important trend within the IT community.There is a lot of discussion among
analysts and developers about the term.Why all the fuss?
16 Chapter 1 Web Services Overview and Service-Oriented Architectures
With the SOA approach to application architecture, your view of the entire software
portfolio is different. SOA augments and grows your application portfolio. Existing appli-
cations can be easily converted to services, to be consumed by existing or new applica-
tions.Your portfolio of applications gradually shifts to become a portfolio of components
exposed as services and applications composed of services (service orchestrations).
Eventually, monolithic, tightly coupled, inflexible applications will be replaced by
SOA-architected applications.This won’t happen overnight, but rather will take place in
an evolutionary fashion, driven by business needs.
With an SOA, organizations will be better able to construct software to integrate
business processes and respond rapidly to changes in the business environment: the
arrival of a new supplier or competitor, a shift of business model, a postmerger combi-
nation of IT assets, the opportunity to outsource a business process, and so on.When
parts of the solution to the new business system were built by autonomous organiza-
tions, an SOA approach is the best approach to stitch the solution together. More than
any technical consideration, this concept of implicit, seamless software integration as a
major business benefit is one of the main drivers for service orientation.
The SOA approach isn’t lost on vendors of prepackaged software applications. Many
major application vendors are at the forefront of Web services standards and SOA prac-
tices.The forward-thinking among the software vendors recognize this new SOA
emphasis and are incrementally moving their product offerings away from tightly
coupled, shrink-wrapped software suites toward more flexible, mix-and-match, loosely
coupled SOA architectures of services.This approach will ease their customers’ task of
integrating packaged software components with existing business systems and processes.
Another important benefit of SOA comes from the notion of bringing IT concepts
and business concepts closer together. Previously, technical architectures reflected too
much technical detail and hid the underlying business process.With SOA, it’s easier to
focus on modeling business processes and tasks as services and building business systems
as workflow combinations of these underlying services.With a closer modeling of the
business system in technology, it becomes easier to isolate the parts of the system that
need changing to reflect those tasks in the business process that need changing.With an
SOA approach, technical details of the service are hidden behind the interface, and the
designer’s attention is focused on jointly (or unilaterally) designing useful service inter-
faces.
Thus the combination of a closer IT model of the business, together with loose cou-
pling, provides the overall business benefit of SOA.The benefit boils down to good
choice of service.What service interface design yields most benefit to the organization,
and which is most useful to important service requestors? Which existing applications
can be refactored or wrappered as services and let you quickly get to the point of build-
ing SOAs from existing IT investments? Which business processes will provide the
biggest benefit if they’re built or refactored as services? These are important questions to
address when you’re considering adopting SOA.
17
Trends in E-Business
SOA and Web Services: Related but Distinct
Although Web services and SOA are often thought about in combination, these two
terms are distinct. SOA is an architectural concept, an approach to building systems that
focuses on a loosely coupled set of components (services) that can be dynamically com-
posed.Web services, on the other hand, is one approach to building an SOA.Web servic-
es provides a standard for a particular set of XML-based technologies that can be used to
build SOA systems.
Trends in E-Business
Interoperability, particularly between heterogeneous distributed systems components, has
been one of the major themes in software engineering in general, and application inte-
gration in particular, for the last decade. It’s unfortunate that the seamless interoperability
vision is still a dream. Brittleness in all current architectures is preventing software from
achieving this vision. Brittleness comes from tightly coupled systems that generate
dependencies at every level in the system. One of the most important lessons we learned
as developers and architects is that systems need to be able to find resources (software or
otherwise) automatically, when and as needed, without human intervention.This ability
frees business people to concentrate on their business and customers rather than worry
about IT complexities.At the same time, it frees system developers to concentrate on
enabling their business and their customers rather than deal with interoperability
headaches by writing glue code and patching systems together.
Trends in application design are moving from rigid structures to flexible architectures.
Trends in business partner interactions are moving from static agreements to more
dynamic agreements. In a so-called value-network g approach, competition isn’t
between individual companies but rather between value-networks of business partners
that can best cooperate and adapt to changing market needs.
We’re seeing these trends in many places, from operating system–level systems man-
agement efforts such as Grid computing all the way to packaged business application
suites.A flexible, dynamically reconfigurable stack of software components is being built,
heralding the era when software systems are less brittle and less expensive to configure,
maintain, and change.
Trends in B2B integration are moving from a proprietary technology-based integra-
tion to business process–based integration using open standards.There is a corresponding
shift in programming and architecture models to enable these trends: from tightly cou-
pled applications to loosely coupled services.
On the technical side, major shifts have occurred toward flexibility and interoperabili-
ty, through open and widely accepted standards.The first major shift happened almost
three decades ago with the advent of TCP/IP as an open platform for networking.This
step enabled such important and pervasive architectures as client-server computing. It
took the advent of the World Wide Web for the next major shift, with HTML and
HTTP providing the first truly universal open and portable user interface. Next, Java
gave us truly open portable programming, and finally XML brought with it open
18 Chapter 1 Web Services Overview and Service-Oriented Architectures
portable data exchange.The next step in this evolution of open standards is the integra-
tion step. How do all these ingredients come together to facilitate the next evolution of
e-business? Web services.
One aspect of more loosely coupled systems is reflected in the move from Remote
Procedure Call (RPC) interfaces toward a messaging or document-centric g model of
distributed computing interface.With a document-centric approach, the interface to the
Web service becomes much simpler and more flexible.An RPC interface presenting a
fixed set of parameters in a fixed order is quite brittle. Small changes to information (for
example, a new requirement for an expiration date on a credit card) require a new inter-
face to be created, published, and understood by the service requestor.With a document-
centric approach, the new information can be added to the document schema defined in
the Web service interface. Programs that use the older schema don’t necessarily break
when the new XML element is added (this is a property of XML namespaces that you
will see in Chapter 2,“XML Primer”).This approach yields Web services interfaces that
are much more flexible, resulting in systems that are adaptive.
Why Do We Need Web Services?
The beginning of this chapter explained the motivation for application-to-application
integration over the Internet to address the current challenges of distributed computing
and B2B integration in particular. Since late 1999, the software industry has been rapidly
evolving XML-based Web services technologies as the approach to solving these prob-
lems.Why build a completely new distributed computing stack based on Web services?
“Because Web services use XML” isn’t the right answer. It’s a correct observation, but
it doesn’t answer the crucial question as to why using XML makes such a big difference.
At a basic level, there are three key reasons why existing distributed computing
approaches are inferior to Web services for solving the problems of e-business:
n The scope of problems they try to address
n The choice of available technology
n Industry dynamics around standards control and innovation
This section will discuss those three key reasons and summarize with a discussion of
characteristics of a good Web service.
Scoping the Problem
Traditional distributed computing mechanisms have typically evolved around technical
architectures rather than broader problems of application integration. For example,
CORBA evolved as a solution to the problem of implementing rich distributed object
architectures.At the time, it was implicitly assumed that this was the right approach to
getting applications to communicate with one another.As we discussed earlier, experi-
ence has shown that RPCs aren’t always the best architecture for this requirement.The
need for loosely coupled applications and business process automation has shown the
19
Why Do We Need Web Services?
benefits of exchanging messages containing data (typically a business document) between
the participants of e-business interactions, a so-called document-centric approach.
Distributed computing specifications address messaging as a computing architecture;
however, there has been no unifying approach that brings RPCs and document-centric
messaging to the same level of importance—until Web services, that is.
Web services have evolved not around predefined architectures but around the prob-
lem of application integration.This is an important distinction.The choice of problem
scope defines the focus of a technology initiative.Web services technologies have been
designed from the ground up to focus on the problems of application integration.As a
result, we can do things outside the scope of traditional distributed computing
approaches:
n Support both document-centric messaging and RPCs
n Transport encoded data from both applications and business documents
n Work over open Internet protocols such as HTTP and SMTP
In other words,Web services are better suited for the task than what we’ve used so far,
because we’ve built them with this in mind. COM/CORBA/RMI are great technolo-
gies for tying together distributed objects on the corporate network. However, the e-
business application integration problem is best tackled by Web services.
Core Technologies
Because Web services address a much more broadly scoped problem, they use much
more flexible technologies than traditional distributed computing approaches. Further,
with Web services, we can leverage all that we’ve learned about connecting and integrat-
ing applications since we began doing distributed computing.These two factors put Web
services on a better technology foundation for solving the problems of e-business than
traditional distributed computing approaches.
Later, in the “Web Services Interoperability Stack” section, we introduce a hierarchical
organization of the technologies and standards associated with Web services. It’s possible
to compare the Web services approach to traditional distributed computing approaches
level-by-level to see why the technical foundation of Web services is more appropriate
for the problems it needs to solve. Rather than going through this lengthy process, let’s
focus on two key capabilities: the ability to represent data structures and the ability to
describe these data structures.
Data encoding is a key weakness for traditional distributed computing approaches,
particularly those that are programming language independent. Sure, they typically have a
mechanism to represent simple data (numbers, strings, booleans, date-time values, and so
on), basic arrays, and structures with properties. However, mapping existing complex
datatypes in applications to the underlying data encoding mechanisms was difficult.
Adding new native datatypes was practically impossible.The fact that data was encoded
in binary formats further complicated matters.
20 Chapter 1 Web Services Overview and Service-Oriented Architectures
Web services address these issues by using XML to represent information. XML’s
text-based form eliminates byte-ordering concerns.The wide availability of XML pro-
cessing tools makes participation in the world of Web services relatively easy. XML’s hier-
archical structure (achieved by the nesting of XML elements) allows changes at some
level of nesting in an XML document to be made without worrying about the effect on
other parts of the document.Also, the expressive nature of attributes and nested elements
makes it easier to represent complex data structures in XML than in the pure binary for-
mats traditionally used by COM and CORBA, for example. In short, XML makes work-
ing with arbitrary data easier.
The choice of XML brought another advantage to Web services: the ability to
describe datatypes and validate whether data coming on the wire complies with its spec-
ification.This happens through the use of XML meta-languages such as XML Schema.
Industry Dynamics
Momentum is a very important aspect of the dynamics of software innovation. Great
problems lead to great opportunities.The desire to capitalize on the opportunities gener-
ates momentum around a set of initiatives targeted at solving the problem.This momen-
tum is the binding force of our industry.This is how major innovation takes place on a
broad scale.The challenge of e-business application integration is great; this is why all the
key players in the industry are focused on it. Customer need, market pressure, and the
desire to be part of the frontier-defining elite have pushed many companies to become
deeply engaged with Web services.
Good things are bound to happen. Consider this:The last time every one of the key
infrastructure vendors was focused on the same set of issues was during the early days of
e-business when the industry was trying to address the challenges of building Web appli-
cations.The net result was a new model for application development that leveraged the
Web browser as a universal client and the Web application server as a universal backend.
In short, trust that some of the very best minds in the industry working together under
the aegis of organizations such as the W3C and OASIS will be able to come up with a
good solution to the problems of e-business integration.
Parallelism is key to building real momentum and increasing the bandwidth of inno-
vation.Traditional distributed computing efforts could not achieve this kind of paral-
lelism because they were driven either by a single vendor (Microsoft promoting COM,
for example) or by a large, slow organization such as the Object Management Group
(OMG), which owns the CORBA standards. In both cases, the key barrier to fast
progress was the centralized management of standards.Any change had to be approved
by the body owning the standard.And Microsoft and OMG owned all of COM and
CORBA, respectively. Open-source efforts such as the Linux operating system and proj-
ects of the Apache Software Foundation fundamentally generate momentum because
people working on them can have a direct influence on the end product.The momen-
tum of Web services is real because standardization work is going on in parallel at the
W3C, OASIS, and many other horizontal and vertical industry standards organizations.
21
Why Do We Need Web Services?
Further, the major players so far have shown a commitment to do a lot of innovation
out in the open.
The interesting thing from a technical perspective is that XML has something to do
with the ability of Web service standardization to be parallelized. XML has facilities
(namespaces and schema) that enable the decentralized evolution of XML-based stan-
dards without preventing the later composition of these standards in the context of a sin-
gle solution. For example, if group A owns some standard and group B is trying to build
an extension to the standard, then with some careful use of XML, group B can design
the extensions such that:
n Its extension can be published independently of the standard.
n Its extension can be present in cases where the standard is used.
n Applications that don’t understand the extension won’t break if the extension is
present.
n Applications that need the extension will work only if the extension is present.
The industry’s focus on Web services combines the right scope (e-business application
integration) with the right technologies (XML-based standards) and the potential for sig-
nificant parallelism and high-bandwidth innovation.This is why Web services will be
successful.
What Makes a Good Web Service?
An IT project should exhibit many (but not all) of the following characteristics before
you should consider modeling the solution using SOA and Web services:
n The problem has a distributed computing nature: parts of the solution exist in
multiple network endpoints.
n The solution needs to consist of components built and run by different organiza-
tions. If there is a single point of control or administration that can resolve any
issue that may arise, you have a broad range of solution choices that can be
imposed by this single administrative control.A multiplicity of partners favors the
dynamic binding nature and XML protocols associated with Web services.
n The components that need to be integrated have heterogeneous platforms (operat-
ing system, application server, programming language).
n The business process should be automated; various characteristics of the solution
can’t require a human interaction for each step. If a human can be involved, stan-
dard World Wide Web technologies such as browsers, JSPs, and servlets will do.
n The business process, and/or the set of components that make up the business
process, change with some frequency. For a dynamic business environment, a flexi-
ble solution is required.
n The business process needs to be policy driven; decisions made within the logic of
the business process need to be based on externalizable policies (which may them-
selves change with some rapidity).
22 Chapter 1 Web Services Overview and Service-Oriented Architectures
n The business process isn’t core and has the potential for outsourcing.With a Web
services approach, outsourcing the business process minimizes the perturbation to
those systems that interface with the outsourced process.
n Data needs to be available to more than just the core applications that
generate/maintain the data. Rapid situation detection and response decision-
making may require accessing data in non-traditional ways.Web services is a simple
approach to making information accessible to all sorts of different requestors.
The Web Service Opportunity
The Web services approach is an application integration concept; it’s a set of technologies
that provides access to business functionality, such as purchase order processing. Often,
the business functionality already exists in the form of legacy transaction processing sys-
tems, existing Web applications, Enterprise JavaBeans, and so on.Web services technology
is about access and application integration; it isn’t an implementation technology.
Organizations use Web services technology in two broad categories: application inte-
gration and business-to-business (B2B) partner integration over the Internet. In either of
these categories,Web services can range in sophistication from simple request/response
functions such as a credit card check to complicated multi-party, multi-stage, long-
running business transactions such as a supply configuration and order system.Web
services can be invoked by PC-based programs, mainframe systems,Web browsers, or
even small mobile devices such as cell phones or personal digital assistants (PDAs).
In addition to application integration and B2B, we’ll discuss another growing use of
Web services: B2C, or building systems with a human interface component using Web
services.
Application Integration
Gartner defines application integration as “making independently designed application sys-
tems work together.”The need for better-integrated applications is huge. Here are just a
few examples from the public Internet and corporate networks:
n Forrester estimates that more than 50% of Fortune 1000 enterprises have over 50
legacy or packaged applications that need to be integrated—in spite of the func-
tional and business needs.The opportunity cost of not integrating these applica-
tions is huge.
n CIO Magazine’s Tech Poll recently showed that more than 85% of surveyed com-
panies have an IT application backlog, weighed heavily toward integrating existing
systems as opposed to buying new systems.
n Have you ever forgotten some of your passwords? If single sign-on (SSO) is broad-
ly deployed, you won’t have to remember so many passwords.
23
The Web Service Opportunity
n Have you ever chosen not to buy from a Web site offering you the best terms
because you didn’t have an account set up and you didn’t want to spend the time
registering? If eWallets work broadly on the Web, this won’t be a problem.
n Email is the life blood of companies. Much relevant business information is sent
and received through email, often outside the context of enterprise systems.A
whole industry of companies has sprung up to address this lack of integration
across multiple domains: sales automation, collaboration, resource planning, and
so on.
n One large financial institution takes more than a week to process a change of
address.The institution thinks that it can generate up to 10% more profit per cus-
tomer if only it can process the change in less than 24 hours. It’s been trying for
years to integrate several applications to do this without success.
End users, IT, and business executives want more integration and information leverage
between the applications they use every day. IDC estimates that the size of the applica-
tion integration software market in the United States is approaching $5 billion.The
United States systems integration (consulting) market, at the same time, was about $38
billion. Most of that is pure labor (as opposed to hardware and software) cost, and much
of it is spent on integrating systems as opposed to building new systems.Two things
become clear from this analysis: First, the total market size for integration is tens of bil-
lions for the United States alone. Second, services and not products account for the
majority of that amount.
To harness the value potential of applications, we need much more integration.The
only way to achieve this is to significantly lower the cost of integration across the board.
There is a problem, however:The low product-to-service ratio in the integration space
puts a constraint on both the rate of growth of the market and the cost of integration
projects. Screen scraping, data mapping, and building bridges between incompatible APIs
aren’t scalable activities—they require trained personnel and a lot of time.When technol-
ogy picks up its pace, IT services can’t keep up. Unless enterprises fundamentally change
their dependence on integration services, they won’t be able to leverage the powerful
trends in computing, storage, connectivity, and standardization. Nor will they be able to
leverage the full value potential of integrated distributed applications. Companies will be
stuck with integration backlogs that forever exceed their resources, both monetary and
human.
The Web services approach offers an attractive set of technologies by which existing
legacy systems can be wrappered as Web services and made available for integration with
other systems within the organization.Applications exposed as Web services are accessi-
ble by other applications running on different hardware platforms and written in differ-
ent programming languages. Using this approach, the complexity of these systems can be
encapsulated behind industry-standard XML protocols. Pair-wise system integration
projects can be replaced with one-to-many systems interactions based on Web services.
The promise of higher-level interoperability initiatives is that over time we’ll be able to
24 Chapter 1 Web Services Overview and Service-Oriented Architectures
develop the set of standards, technologies, and tools that will enable small and large busi-
nesses to easily integrate systems internally; then they can mix and match the implemen-
tation of various activities within a business process, maintaining the option to outsource
any or all of these activities if doing so makes business sense.
B2B
Another key driver behind the rise of Web services is the continuing evolution of B2B
computing. B2B computing is about integrating the business systems of two or more
companies to support cross-enterprise business processes such as supply chain manage-
ment. B2B applications can be as simple as automated credit card validation or as com-
plex as the full automation of the multi-billion-dollar supply chain of a Fortune 100
company.The challenges of building B2B applications combined with their huge market
potential drove rapid innovation that has taken the industry from simple business-to-
consumer (B2C) g applications to SOAP-enabled Web services in a matter of five years.
Integration of Human Interaction with Systems: B2C
Online HTML-based applications are consumer oriented.The classic example of a B2C
Web application is the Amazon book search.To access this functionality, a human being
needs to use a Web browser to navigate the company’s site through multiple page transi-
tions, input information using Web forms, submit them, and get the results back in
human-readable form.The only way to automate this process is to simulate how a
human uses the system. Doing so involves reverse-engineering the Web application to
see how it moves data between pages, passing the data automatically from page to page,
and, finally, parsing any data contained in the response HTML of pages.This screen-
scraping approach was popular in the early years of the Web (1995–97), but it’s very
error prone.The only true way to integrate applications on the Web is to use a B2B-
focused solution.
Because B2B applications are designed to have other applications as their clients,
they’re fundamentally different from B2C applications.Table 1.1 summarizes some of
these differences for Java applications. Both types of application are unrestricted as to the
type of backend they can use—typically, Java classes or Enterprise JavaBeans (EJBs). (We
discuss how Web services work with EJBs in more detail in Chapter 7,“Web Services
and J2EE.”) This is where the similarities end, however.
To customize backend logic, B2C applications use servlets or Java ServerPages (JSPs)
hosted in a servlet engine. B2B applications customize their backends using straight Java
code (often EJBs) hosted inside a Web service engine. B2C applications communicate
with a browser over HTTP. B2B applications can use any of the open Internet protocols
such as HTTP, SMTP, or FTP, or proprietary networks such as EDI. B2C applications
handle data over the straight HTTP protocol. Input comes as GET parameters (on the
URL/query string) or as POST parameters from Web forms. Only strings can be
exchanged; any other datatypes, even numbers, need to be encoded as strings. For out-
put, data is mixed together with formatting rules inside HTML pages.This is in marked
25
Justifying Web Services
contrast with B2B applications, which use XML for both data input and output. XML is
perfect for B2B computing because it’s programming language- and platform-neutral, it
can represent arbitrary data structures, it’s easy to process, and it can be validated inde-
pendently of its processing. B2C applications need a UI (typically HTML, although
some use Java applets) because their clients are humans. B2B applications have no UI
because their clients are other applications.
Table 1.1 Comparing B2C and B2B Java Applications
Area B2C Application B2B Application
Backend logic Java classes and EJBs Java classes and EJBs
Controller logic Servlets and JSPs Web service engine
Communication protocol HTTP HTTP/S, SMTP, FTP,TCP/IP, EDI,
JMS, RMI/IIOP…
Data input HTTP GET/POST XML
parameters
Data output HTML XML
UI HTML + script N/A
Client Human behind a browser Software application
Justifying Web Services
Information technology investments must be evaluated against all other competing
potential uses of a firm’s capital and other resources.This evaluation usually involves
doing a net present value analysis to determine a dollar value of the costs and the benefits
over time, and distilling this analysis into a single current value that can be compared
with other investments. If the estimated value of the benefits doesn’t exceed the cost, the
project isn’t financially justifiable.
The task is to understand the categories of costs and benefits for a Web services proj-
ect.We’ve outlined some of the benefits in this chapter; they’re summarized as follows:
n Application integration can be done in a faster and cheaper manner.
n Application integration can be done in ways that were hard to cost-justify with
previous technologies. For example, the platform neutrality of Web services allows
designers to combine business systems with all sorts of devices (such as PDAs, cell
phones, normal desktops, server-based applications) with service providers of all
shapes and sizes from small ones (such as radio frequency ID tags) to more tradi-
tional Web applications and mainframe systems.
n Time to market is reduced for new IT systems that support new or modified busi-
ness processes.This is largely achieved by wrappering existing functionality. If the
function exists, but only in a form that’s hard to integrate, a simple adapter or
wrapper function will quickly and cheaply enable other applications to exploit the
existing function.
Other documents randomly have
different content
apartment, and around this they at once assembled, while
Nenci, opening the lady’s dressing-bag which he carried,
took therefrom a small oblong box of polished oak, which he
set upon the table, afterwards displaying the exquisite
replica of the bust of the reigning sovereign of Italy.
“Beautiful!” they all cried with one accord. “Nothing could
be better!”
“Its action is marvellous,” Malvano explained. “We have
already tried it. The effect is frightful. When set, it contains
explosives enough to reduce every house in this street to
ruins.”
They looked at one another and shuddered.
“It’s really very inoffensive-looking,” her ladyship remarked,
raising her glasses, deeply interested. “I hope it isn’t
charged!”
“Oh dear, no,” Nenci laughed, taking it in his hand. “I’ve
brought it here to show how the mechanism is contrived;”
and bending towards her, he opened its malachite base,
showing the empty receptacle for the explosive compound,
the hole for the tiny tube of acid, and the small clockwork
mechanism no larger than a watch imbedded deeply in
cotton-wool, so as to be noiseless. Standing at the table, he
glanced keenly from one to the other as he explained its
working. As he handled the bust tenderly, his keen black
eyes seemed to shine with an evil light.
When he had concluded, he replaced the mechanical
portions he had removed, and put the bust back into the
dressing-bag beside him.
“No, no,” Malvano said, smiling grimly, some minutes later.
“Don’t hide it away, Lionello. It’s well worth our admiration,
and does you credit. This is the last time we shall have an
opportunity of seeing it, so let it remain on the table.”
All joined in a chorus of laughter and approbation, and
Nenci, fumbling in the bag at his side, reproduced it and
placed it upon the table in full view of their gaze. At that
moment Gemma, deep in conversation with her ladyship,
did not notice that the bust was before them, and not until
Nenci and Malvano had left the room together in order to
consult with the foppishly dressed young man outside in the
drawing-room, did she detect its presence.
Then, with a sudden scream of wild alarm, she dashed
forward, her bare arms raised in despair, crying—
“Look! Look! This is not the bust he showed us at first, but
another! This one is charged! Fly quickly—all of you! In
another instant this house will be in a mass of ruins, and we
shall all be blown to atoms! This is Nenci’s diabolical
vengeance!”
With one accord they sprang from their chairs and rushed
towards the door. Tristram was the first to gain it, turned
the handle.
“God! It’s locked!” he shrieked.
Nenci, the sinister-faced man who, with his two infamous
companions, had secured them in that room with the
frightful engine of destruction in their midst, had
ingeniously escaped. Speechless, with faces blanched, they
exchanged quick apprehensive glances of terror. Those
moments were full of terrible suspense. All knew they they
were doomed, and appalled, rooted to the spot by
unspeakable terror, none dared to move a muscle or touch
that exquisite bust upon the table. Each second ticked out
clearly by the Sèvres clock upon the mantelshelf brought
them nearer to an untimely and frightful end; nearer to that
fatal moment when the tiny glass tube must be shattered
by the internal mechanism, and thus cause an explosion
which would in an instant launch them into eternity.
Chapter Twenty Nine.
Entrapped.
As all drew back aghast and terrified from the little face of
carved stone, Gemma, who had tried the door only to
discover the truth of Tristram’s appalling assertion, dashed
instantly back to the table, and, regardless of the imminent
risk she ran, took the small image in her hands.
“No, no!” they cried with one voice, haunted by the fear
that at any second it might explode and blow them out of
all recognition. “Don’t touch it! don’t touch it!”
“On the night when the two men completed their hellish
invention, I watched through the shutters unseen,” she
cried. “I saw Nenci explain how this deadly thing was
charged, and the mode in which it was set. See!” In an
instant all had grouped round her, as, turning the bust
upside down, she eagerly examined it beneath the shaded
lamp. The scratch running across the malachite base and up
the outer edge of the removable portion was, she saw,
contiguous to a mark higher up. Nenci had turned the
circular base until the ends of the almost imperceptible line
had joined.
Another instant and nothing could save them.
With trembling hands Gemma grasped it, as Nenci had done
on the night when she had watched, and with a quick
wrench tried to turn it back.
It would not move!
Next second, however, she twisted it in the opposite
direction. As she did so there was a harsh grating sound, as
of steel cutting into stone, a crack, as though some strong
spring had snapped; and then all knew that the mechanism
of the devilish invention had been disordered, and the
frightful catastrophe thereby averted.
She bent down, opening Nenci’s bag, and took therefrom a
second bust, exclaiming—
“He tricked us cleverly. Fortunately, however, I detected the
difference in the markings of that green stone, or ere this
we might each one of us have been dead.” Then, placing the
two busts side by side, she pointed out the difference in the
vein of the malachite which had attracted her attention, and
thus caused her to make the astounding declaration which
had held them petrified.
“You’ve saved us!” the Gobbo cried, addressing her.
“These men must not escape,” Gemma cried determinedly.
“They shall not! Our lives have been endangered by their
villainous treachery, and they shall not evade punishment.”
Chapter Thirty.
“I Bear Witness!”
Next morning Gemma stood at the window of her bedroom,
looking down upon Northumberland Avenue. She had
breakfasted unusually early, and had chosen a dark-green
dress trimmed with narrow astrachan—one of her Paris-
made gowns which she knew fitted her perfectly and suited
her complexion. She had stood before the long mirror in the
wardrobe for some minutes, and, with a pride that may
always be forgiven in a woman, regarded herself with
satisfaction. They knew how to make a woman look her
best in the Rue de la Paix.
The recollection of the previous night was, in the light of
morning, horrifying. After leaving Sussex Square, she had
stopped her cab at the telegraph office opposite Charing
Cross Station, the office being open day and night, and had
sent a long and urgent message to Rome explaining the
situation. Already a reply reposed in the pocket of her
gown, but it was unsatisfactory. The private secretary had
wired back that the Marquis was away at his high-up,
antique castle of Montelupo, “the Mountain of the Wolf,”
between Empoli and Signa, in Tuscany. She therefore knew
that many hours must elapse ere her cipher message was
delivered to him. Even his reply could not reach her for four
hours or so after it had been despatched from Empoli. But
after sending the message to Rome, she had also sent one
to Armytage at Aldworth Court, and was now awaiting his
arrival.
Her hands were cold and nervous, her eyes heavy and
weary, and her face deathly pale and haggard, for she had
slept but little that night. She saw plainly that all her
desperate efforts to free herself had been in vain. There had
been a hitch somewhere, or that night the whole of that
assembly at Lady Marshfield’s would have been arrested by
detectives from Scotland Yard, at the instigation of Count
Castellani, acting under telegraphic orders from Rome. Italy
would thus have been able to rid herself of as desperate a
gang of malefactors as ever stood in the dock of a criminal
court. She had kept faith with the Marquis Montelupo, her
master, and, in order to gain her freedom, had furnished
the Ministry with full details of the plot. Her freedom of
action had been promised her in exchange for this
information, but with the stipulation that the conspirators
must be arrested. The Marquis, cunning and far-seeing, was
well aware that this would ensure greater secrecy, and hold
her as his agent until the very end.
No arrest had, however, taken place. All her plans had failed
utterly, and, in a paroxysm of despair, she told herself that
she was still, even at that moment, as far off gaining her
freedom as ever she had been. Her tiny white hands
clenched themselves in despair.
“I love him!” she murmured hoarsely. “I love him; but Fate
always intervenes—always. Shall I never be released from
this terrible thraldom? I pray day and night, and yet—”
She paused. Her eyes fell upon the small ivory crucifix
standing upon a pile of books beside her bed. She sank
upon her knees, clasped her hands, and her thin white lips
moved in fervent prayer.
Suddenly, while her head was still bent upon her breast in
penitence, as she craved forgiveness for violating the oath
she had taken to these men who sought her death, a
master-key was placed in the door and the chambermaid
entered.
“Pardon, Madame,” the girl exclaimed in French, drawing
back as soon as she saw her, “I thought you had gone out.
A gentleman has just been shown to your sitting-room, and
is waiting.”
“A gentleman!” Gemma repeated blankly, rising to her feet.
Then she recollected. It was her lover who had come in
response to her telegram. What could she tell him?
“Very well,” she answered. “I’ll see him at once;” and as the
girl withdrew, she stood looking at herself despairingly in
the mirror. Again she dare not tell him anything. She was
still beneath a double thraldom of guilt.
With both her hands she pushed back the mass of gold-
brown hair from the pale fevered brows, sighing; then, rigid
and erect, walked down the corridor to her own sitting-
room. Her heart beating wildly, but with a glad smile upon
her face, she entered.
Instantly she halted. Her look of pleasure gave place to one
of hatred. Her visitor was not Charles Armytage, but the
man who, only twelve hours before, had secured her and
her companions within that room with the terrible engine of
death in their midst. It was Lionello Nenci, who stood with
his back to the window, his hands idly in his pockets. His
sallow face was that of a man haunted by terror, and driven
to desperation. His cheeks were pale beneath their southern
bronze, and his black eyes glittered with unnatural fire as
he advanced towards her.
“You!” she gasped in withering contempt. “You! The mean
despicable cur who sought to kill us!”
“Yes!” he answered unabashed. “Shut the door. I want to
speak to you.”
In involuntary obedience she closed the door, and the
portière fell behind her.
“I should have thought, after your infamous conduct last
night, you would not ever dare to face me again,” she cried
in scorn. “Such treachery is only worthy of gaol-birds and
traitors.”
“You deserved it,” he laughed roughly. “You are one of the
latter. It was you,” he went on mercilessly—“you, with your
innocent-looking face, who gave the whole plot away, who
exposed us to the Ministry, and put the English police upon
us; you who sought our arrest and punishment. It is but
what was to be expected of such a woman as yourself, the
spy and mistress of Montelupo.”
“Mistress!” she echoed, in an instant frenzy of passion. “I’m
not his mistress. I swear I’ve never been. You know that’s a
foul lie!”
“Every one in Italy believes it,” he said, with a brutal laugh.
“When they know that you were implicated in the plot, and
gave it away to him, it will confirm their suspicions.”
She looked at him, intense hatred in her glance.
“And you have come here to tell me this!” she cried.
“Having failed in your dastardly attempt last night, you
come here to-day to taunt me with the past!”
“No. The reason I’ve called is to calmly explain the position.
The police are already upon us, but the Doctor and
Romanelli have left London. I unfortunately, am unable, for
I’ve no money,” he added, in a whining tone. “I’ve come to
throw myself upon your generosity; to ask you for some.”
“You wish me, the woman whom you denounce as a spy
and traitor—whom you and your infamous companions
endeavoured to kill—you ask me to furnish you with funds
so that you may escape the punishment you deserve?” she
cried in scorn, amazed at his boldness. “I shall not stir a
finger to save you,” she answered promptly.
“Come,” he said. “There’s no time to lose if I’m to escape.
Remember, I’m the man for whom the police of Europe have
been searching in vain these last two years, ever since I
escaped from Elba; and if I’m again to evade them, it will
be expensive. If you’re not prepared to sacrifice yourself,
then give me money and let us part. You are rich, and can
well afford it,” he added. “Come. Take my advice, and let
the whole thing end here. Assist me this, the last time, and
I swear to you that I’ll say nothing implicating you, even if
afterwards I’m arrested.”
“If I give you money, it is on the understanding that you will
not in future levy blackmail,” she said, eyeing the cringing
man before her with contempt. “Recollect that any
communication from you will result in your immediate
arrest. You know, one word from me at the Ministry and the
police will follow you, wherever you may be.”
“I agree,” he cried eagerly.
She drew from her purse three English notes, each for five
pounds, and handing them to him said—
“This is all the money I have at the moment, without
drawing a cheque.”
“It’s not enough—not half enough,” he declared in a tone of
dissatisfaction, glancing at the clock. “There’s little time to
lose. A North German Lloyd boat sails from Southampton
for New York this afternoon, and the train leaves Waterloo
at noon. This money won’t even buy my passage and
necessaries.”
She reflected for an instant, and glanced down at her fragile
hands. An instant later, in sheer desperation, she cried—
“Then take my rings!” And twisting them one by one from
her fingers, including the antique one of turquoise and
diamonds, she laid them, together with her brooch, on the
little writing-table where they were standing. “They’re worth
at least five thousand francs,” she said. “Take them, sell
them, do what you like with them, but never let us meet
again.”
Eagerly he took up one—a beautiful diamond half-hoop ring,
and glancing at it in admiration, was about to place it in his
vest-pocket, when there came a loud rap at the door, and
the message-boy, shouting her hotel number, ushered in
two men.
Nenci turned quickly towards the door, and shrank back in
terror and dismay.
The men who entered were Tristram and Armytage. The
face of the latter was dark with determination. He had not
expected to find Gemma with a stranger; moreover, the fact
that her rings and brooch lay upon the table between her
and her visitor puzzled him.
“Ah, dearest!” she cried, rushing towards him, her nervous
hands outstretched. “You have come back to me at last—at
last!”
Without taking her proffered hands, he looked straight into
the sallow, evil face of the Italian. Nenci boldly met his
gaze.
“This is the scoundrel who, as I’ve just told you,
endeavoured last night to destroy Gemma, myself, and
several other persons at Lady Marshfield’s?” Tristram cried,
glaring at the black-haired inventor of the terrible engine of
death.
“And this,” retorted Nenci, pointing at the Captain—“this
man is a murderer! It was he who killed Vittorina Rinaldo!”
“You’re a liar?” Tristram answered, his face livid and set.
“The evidence against me is circumstantial enough,
perhaps, to convict me of the crime, but I am innocent—
absolutely innocent. I myself was the victim of a dastardly
plot. Little dreaming of what was intended, I escorted her
from Leghorn to London, and thus unwittingly myself
created circumstances which were so suspicious as to fasten
the terrible guilt upon me. But I declare before Heaven that
I’m in ignorance of both the motive and the secret means
by which the crime was accomplished!”
The outlaw laughed a harsh, dry laugh. His demeanour at
the first moment of their entry into the room had been one
of fear. Now he was fiercely defiant, and affected
amusement at their demeanour.
“If you can prove your innocence, then do so,” he said
grimly. “According to the papers, you left the cab, entered
the bar, spoke to your accomplice, the Major, whoever he
was, and then escaped by the back entrance.”
“True,” replied the King’s Messenger. “But my hurried flight
had nothing whatever to do with the murder of Vittorina,
nor did my conversation with the Major bear upon it in any
way whatever. I merely expressed surprise at meeting him
there after leaving him at the station; and he, too, was
surprised to see me. Then, while in the bar, I suddenly
recollected that, in the hurry of alighting from the train, I
had left in the carriage a despatch-bag given me by one of
the messengers of the Embassy in Paris to convey to
London; and knowing that the train would be shunted out,
perhaps down to the depot at Nine Elms, I made all speed
back to Charing Cross, where I found that a porter had
already discovered it, and taken it to the lost-property
office. I had no fear of Vittorina’s safety, for I had already
given the cabman the address in Hammersmith, and every
second was of consequence in recovering my lost
despatches.”
“But the Major’s photograph was discovered in Vittorina’s
bag,” Nenci cried in a tone of disbelief. “How do you account
for that?”
“I don’t know. To me, that fact is a mystery, although I have
since entertained a suspicion that the Major, when he met
me, must have been aware that the girl’s life was to be
taken. He called upon me afterwards, and we were both
afraid of arrest upon circumstantial evidence. I was aware
that he was implicated in some shady transactions in the
City, for he confessed to me his intention of leaving England
secretly.”
“Your story is ingenious enough,” Nenci replied, “but it will
never convince a jury of your innocence. You can’t clear
yourself. It’s absolutely impossible.”
“One moment,” interrupted Armytage, who, standing beside
his well-beloved, had been intently watching the face of this
desperate malefactor during this argument—“one moment,”
he said coolly. “This visit is a very fortuitous circumstance.
A face such as yours, one never forgets—never. We have
met before.”
“I think not, signore,” the other answered, smiling with that
ineffable politeness which so often nauseates. “I haven’t the
pleasure of knowing you, save that I presume you are the
affianced husband to the Signora Contessa.”
“But I know you, although it isn’t much of a pleasure,”
Armytage answered quickly, in a voice that showed that he
was not to be trifled with. “You declare that we’ve never
met before. Well, I’ll just refresh your memory,” he went on,
slowly and deliberately. “One night, the night previous to
leaving for Italy, while passing the Criterion on my way from
the Junior United Service to the Alhambra, I saw a cab stop
and my friend Captain Tristram alight and enter the bar,
when almost next moment a man brushed past me.
Beneath the electric light I saw his face distinctly. I saw him
raise his hat, mount the step of the cab, shake hands
cordially with the girl sitting inside the vehicle, and at once
dart away. I didn’t enter the Criterion, as I had an
appointment with a man at the Alhambra, and was late.
Next morning, however, when in the train between London
and Dover, on my way to Italy, I read in the paper that the
girl I had seen had been murdered.” He paused for an
instant to watch the effect of his words; then declared, in a
voice which betrayed no hesitation.
“The man who brushed past me and mounted on the steps
of the cab was you! It was you who killed her!”
The colour died from Nenci’s face. He tried to speak. His lips
moved, but no sound escaped them. This unexpected
denunciation fell upon him as a blow; it crushed him and
held him speechless, spell-bound.
“Is it really true?” cried the Captain, open-mouthed, as
astonished as the murderer himself.
“This man before you was the murderer. To that I bear
witness!” Armytage replied.
“She was going to his house at Hammersmith,” Tristram
said, perplexed. “There must have been some motive in
killing her before she arrived there.”
“Of course. It’s easy to discern that such a crime allayed all
suspicions. No one would dream that the man calmly
waiting at home expecting her arrival was actually the man
who murdered her.”
The dark-faced outlaw, watching the two men with covert
glance, made a swift movement towards the door. But
Tristram was too quick for him, and springing forward,
placed his back against it, saying—
“No, when you leave this room you will be accompanied by
a constable. It isn’t safe to trust you out alone.” Then,
turning to his old college friend, he added, “What you’ve
just said, Armytage, has renewed life within me, old fellow.
I knew I was the victim of some foul plot or other, but I
never suspected this man of being the actual assassin. His
character’s desperate enough, as witness his mean,
dastardly attempt upon us last night; but I never dreamed
it possible for a man to commit murder so neatly as he did.”
“You are determined to keep me here?” Nenci cried, his
eyes glaring savagely like an animal brought to bay.
“I am determined to give you up to the police,” Tristram
answered. “Remember, I am suspected, and I now intend to
clear myself.”
“And risk arrest for the conspiracy.”
“There’s no proof that I was ever associated with you,” the
Captain answered. “The word of a murderer isn’t worth
much.”
“You are prepared for the revelations that I can make?”
“I’m prepared for anything so long as you meet with your
deserts,” the Captain responded.
For an instant the wretched man, his sallow face haunted by
a look of unutterable dread, glanced from one to the other.
Then, convinced that all were determined, and realising that
escape was now utterly impossible, he stepped forward,
and, snatching up from the table the antique ring set with
the turquoise and diamonds, with a quick movement slipped
it upon the little finger of his left hand. They watched him in
wonder.
“You think to have a magnificent revenge,” he cried, glaring
wildly at them. “But I will cheat you yet. Watch!” And with
the thumb and finger of his right hand he pressed the large
turquoise.
From beneath the ring there escaped a dark-red bead of
blood.
“Go!” he shrieked hoarsely, his face haggard, deathlike.
“Go, call the police! Denounce me, do your worst, but you
will only take my lifeless body. May it be of service to you.
This you intended should be a fine coup of vengeance. But
I’ll cheat you yet! I’ll cheat you—I—”
“Ring, and call in the police,” Armytage suggested.
“Useless! useless!” the wretched man gasped, his face
drawn and distorted as, clutching the back of the chair, he
stood swaying forward slightly. “Can’t you see that all your
carefully planned revenge is unavailing?”
They regarded him in blank astonishment. Even as they
looked his face changed, and he was seized by convulsions
which shook him from head to foot.
“Can’t you see?” he cried wildly. “I’ve cheated you, and I’m
dying. On my finger is the death-ring—the pretty finger
ornament which, when pressed, punctures the skin beneath
and injects a poison which is swift, and to which there is no
known antidote.”
“Heavens!” cried the Captain, glancing at the ring the
assassin had assumed. “Now that I remember, Vittorina
wore a ring exactly similar to that! Upon her hand after
death was a strange discoloration which puzzled the
doctors. Then she was murdered by a simple pressure of
the hand, which inflicted a puncture beneath the ring, and
the latter, being irremovable on account of the post-mortem
swelling, the cause of death remained concealed. Truly the
means by which she was killed were as cunning and swift as
the manner in which the crime was accomplished.”
The haggard, white-faced culprit stood swaying forward,
holding the chair, his black eyes starting from his head, his
parched tongue protruding, his lips drawn, his whole
appearance horrible. In those moments of intense agony a
jumble of half-incoherent words, like the gibbering of an
idiot, escaped him; yet from them it seemed as though he
were living his whole evil life again, and that scenes long
since past flashed before him, only to be succeeded by this
final one—more tragic, more terrible, more agonising than
them all.
“I told you that the police should never take me!” he gasped
with extreme difficulty. “Montelupo’s bloodhounds have
already scented me to-day, but I’ve tricked them as I’ve
tricked you. I’m not afraid of death. I’m no coward. See!”
And again he grasped the ring, and, grinding his teeth,
pressed the tiny steel point therein concealed deep into the
flesh.
Then he gave vent to a loud, harsh laugh, meant to be
derisive, but sounding horrible in combination with the
death-rattle in his throat. His life was fast ebbing. Great
beads of perspiration rolled off his white brow. Again he
tried to speak, but the single word “Vittorina,” hoarse and
low, was the only one that passed his twitching lips. His
bright, glassy eyes, still flashing a murderous hatred in the
agony of death, were fixed immovably upon his accuser,
when suddenly, almost without warning, he was seized with
frightful convulsions, his jaws set, the light died from his
face, his legs seemed to give way beneath him, and,
reeling, he fell headlong to the floor, carrying the chair with
him.
Both men in an instant knelt eagerly beside him.
Tristram quickly loosened his vest, and placed his hand
upon his heart. It had already ceased its action.
The subtle Eastern poison—for such it afterwards proved to
be—had done its work swiftly, completely. Lionello Nenci—
conspirator, murderer, and outlaw, one of the most
desperate and dangerous characters that Italy has produced
during the past decade, and the miscreant whose arrest had
been stipulated by the Marquis Montelupo in his compact
with Gemma—was dead.
Le Funaro was free. The terrible thraldom which had
compelled her to act as secret agent of the State was for
ever ended.
Chapter Thirty One.
Fiori d’Arancio.
Nearly a year had gone by.
The strange suicide of an Italian at the Hotel Victoria had
been regarded merely as a tragic incident by readers of
newspapers, for no word of the motive which led Nenci to
take his life had been allowed to leak out.
To the public, the death of Vittorina still remains one of
London’s many mysteries.
In the few brief months that had elapsed, peace, calm and
complete, had come to Gemma and to Charles Armytage;
for one morning, in the dimly lit old Church of Santa Maria
Novella, in Florence, and afterwards at the Office of the
British Consul-General in the Via Tornabuoni, they had been
made man and wife. Then, for nearly six months, they had
travelled in Austria, Switzerland, and Germany,
subsequently spending the winter in a furnished villa high
up on the olive-clad hill behind Cimiez, where they were
visited by Captain Tristram and Carmenilla, who, too, had
married, and were spending their honeymoon on the
Riviera. At last, when Carnival had come and gone, the
season waned, and Nice and Cannes were emptying, they,
too, left and returned to the great old Palazza Funaro in
Florence.
They had dined tête-à-tête one evening, had strolled arm in
arm through these great silent chambers which seemed to
speak mutely of the gorgeous pageantry in the days when
the Medici had ruled Florence, and entered the room
furnished in modern style—the same in which he had a year
ago pledged his belief in her.
After the man resplendent in the Funaro livery had brought
their coffee, Gemma seated herself upon the settee beside
her husband, and, taking up her mandolino, commenced to
sing that sweet old Tuscan song he loved so well, which has
for its chorus—
“O bello mio adorabile
Svenire in se mi par
Vorrei fuggirti rapida,
Non so come mi far!”
When she had finished, she was silent, as if in hesitation;
then, with her clear eyes fixed upon his, exclaimed, in very
good English—
“You have trusted me blindly, completely, Nino. You married
me in face of all the vile libels which spread from mouth to
mouth; yet only to-night am I free to tell you the truth. My
story is a strange—a very strange one. Would you like to
hear it?”
“Of course, dearest,” he cried eagerly. “You know for
months I have longed to know the truth.”
“Then you shall know. I will tell you everything,” she
answered. “When I returned here fresh from the convent-
school, with unformed girlish ideas, I fancied that the King
had slighted my family, one of the oldest in Tuscany, and,
finding myself possessor of this place and my father’s
fortune, became imbued with a deep, implacable hatred of
the monarchy. I lived here with a maiden aunt, took sides
with the Republicans, and was induced to secretly join a
league of desperate malefactors who had in view the
establishment of the long-dreamed-of republic in Italy. In
my youthful ignorance, I knew nothing of the means by
which they intended to accomplish their object, for their
action seemed confined in daubing in black paint upon the
walls and pavements of the principal cities such as ‘Down
with the royal robbers! Long live the Republic!’ In every
town where elections took place the ominous writing on the
wall appeared, but the authorities were never able to detect
its mysterious authors. With old Lady Marshfield, whose
eccentric support of all sorts of wild schemes is well known,
and who lived in Florence at that time, I joined this secret
league at a meeting held in a house on the Passeggio in
Livorno, only a few doors from where I lived when we spent
so many sunny hours together. A month later, however, at a
reception one night at the British Embassy at Rome, I found
myself chatting with the Marquis Montelupo, His Majesty’s
Minister for Foreign Affairs. Having obtained my sanction,
he next day called upon me; but his attitude had changed,
for he accused me of being one of the ringleaders of this
mysterious gang, and declared that he would order my
arrest if I did not consent to become a spy in the service of
the Ministry. He saw, I suppose, that I was young,
attractive, and could possibly obtain knowledge of certain
secrets which would be of use to him. In vain I pleaded,
even upon my knees, but he was obdurate. He intended, he
said, to stamp anarchism out of Italy, and told me that to
avoid imprisonment and disgrace I must furnish complete
reports of the intentions and doings of my associates. At
last—well, at last I was forced to consent.”
“You became a spy?”
“Yes,” she answered hoarsely. “I became a mean,
despicable traitor, a wretched, soul-tortured woman, whose
denunciations caused the arrest and imprisonment of the
more dangerous members of the gang, while at the same
time, moving in the diplomatic circle in Rome, I furnished
constant reports to Montelupo of the feeling existing
towards Italy. Friendless and helpless, I became that man’s
catspaw. He held me for life or death. He spread reports
about me, vile scandals which caused respectable people to
shun me, but increased my popularity among the faster set
in Rome and Florence, to whom I became known as the
Contessa Funaro although I was unmarried. When I
protested, he merely laughed in my face, saying that he
had done so for political reasons, because it had got abroad
that I was in the pay of the Ministry, and if I showed myself
to be a gay, heartless woman, instead of a patrician
diplomatist, this rumour might be refuted.
“So, compelled to suffer this indignity in silence, and
maintain the ignominious part he had allotted to me, I went
to Livorno under the assumed name of Fanetti, and
attended the constant meetings of the league which were
taking place there. Was it any wonder that I should, under
such circumstances, actually become an Anarchist? Among
the members of this band of secret assassins—an offshoot
of the dreaded Mafia—was a girl named Vittorina Rinaldo,
who, having ascertained by some means that Nenci and
Malvano, then in England, had misappropriated the greater
part of the funds of the league, resolved to travel to London
and denounce them. This she did, being accompanied
thither by Captain Tristram, who had been induced to join
us by Lady Marshfield, and, I suppose, with some vague
hope that the knowledge thus acquired might be of service
to the British Foreign Office. Vittorina and myself had taken
the oath at the same meeting of the league, and had on
that night received from Nenci, the leader, rings of exactly
similar pattern—‘marriage rings,’ he laughingly termed
them. Well, you are aware of that scoundrel’s devilish
ingenuity. It was he who had made those rings so that by a
mere pressure of his hand upon the ring the poison was
injected, and the girl’s life taken. You know how cleverly
circumstantial evidence was fastened upon her friend. From
recent inquiries, I have discovered that Vittorina’s relations
on her mother’s side were English, and had a villa up at
Como, and that Major Maitland, having a couple of years
before appropriated a large sum of money belonging to her,
was no doubt an accessory to her death, for he has never
been heard of since the night of the crime. Remember that
his photograph was found among her possessions, and that
he was no doubt with Nenci awaiting her arrival that night
at Charing Cross.”
“There seems to be little doubt, from the fact that Nenci
gave you a similar ring, that he intended you should share
the same fate as Vittorina,” her husband observed,
marvelling at her story.
“Certainly he did,” she answered. “Time after time I strove
to free myself, from the fetters ever galling me and driving
me to desperation, but Montelupo was always inexorable.
He loved Vittorina, I afterwards discovered, for it was he
who had written that mysterious letter signed ‘Egisto,’ and
he was determined to avenge her murderer. Like ourselves
he was utterly unaware of the identity of the assassin. Now,
however, that you have supplied the information wanting,
and the culprit has paid the penalty; now that Malvano, the
man who so cleverly acted as secret agent of the Embassy
in London, while the same moment he was plotting against
the State, and his cunning companion, Romanelli, have
been arrested, tried at Rome, and will spend the remainder
of their lives in imprisonment on Elba, my master has given
me my freedom. I am free to love you, Nino.”
“But the little marble image?” he said. “Why was that
deadly thing so ingeniously contrived?”
“In order to strike a blow which was intended should
paralyse the monarchy and cause a revolution in Italy,” she
answered quickly. “In the blue boudoir in the Quirinal, on a
sideboard behind the Queen’s private writing-table, there
stands a tiny but exactly similar bust. In collusion with one
of the royal servants, it was proposed to exchange this
image for one invented by Nenci and Malvano, so that when
His Majesty joined the Queen one night after dinner, both
would be blown into eternity.”
“Then, by your efforts, and by the imminent risks you ran
among that desperate gang, you averted the terrible
catastrophe—you, indeed, saved Italy.”
“I suppose I did,” she said. “At that time political feeling ran
high, and such a blow at the monarchy would have
undoubtedly given the Republicans and Anarchists the
upper hand. But I do not now regret,” she added, a look of
supreme happiness lighting up her beautiful countenance
—“I do not regret, Nino, because I have secured your true
honest love.”
“I believe in your honesty, darling, for I know how terribly
you have suffered,” he exclaimed, drawing her closer to
him, until her head fell upon his shoulder. “Those who now
seek to besmirch your good name shall answer to me.”
Their hands clasped, their eyes exchanged a love-look long,
deep, and intense. Then her eager lips met his in one fierce
passionate kiss.
“The years of my bondage are like some half-remembered
hideous nightmare, Nino,” she murmured, still gazing full
into his eyes. “But it is all finished, for you, my husband,
true, patient, and forbearing placed in my hand a weapon
against my enemies; you brought back to me a renewed
desire for life and its pleasures; and you gave me
deliverance from the evil that encompassed me. Truly a
perfect peace is ours, for the dark Day of Temptation has
waned, and has given place to a bright and blissful dawn.”
The End.
| Chapter 1 | | Chapter 2 | | Chapter 3 | | Chapter 4 | | Chapter 5 |
| Chapter 6 | | Chapter 7 | | Chapter 8 | | Chapter 9 | | Chapter 10
| | Chapter 11 | | Chapter 12 | | Chapter 13 | | Chapter 14 | |
Chapter 15 | | Chapter 16 | | Chapter 17 | | Chapter 18 | | Chapter
19 | | Chapter 20 | | Chapter 21 | | Chapter 22 | | Chapter 23 | |
Chapter 24 | | Chapter 25 | | Chapter 26 | | Chapter 27 | | Chapter
28 | | Chapter 29 | | Chapter 30 | | Chapter 31 |
*** END OF THE PROJECT GUTENBERG EBOOK THE DAY OF
TEMPTATION ***
Updated editions will replace the previous one—the old editions will
be renamed.
Creating the works from print editions not protected by U.S.
copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying
copyright royalties. Special rules, set forth in the General Terms of
Use part of this license, apply to copying and distributing Project
Gutenberg™ electronic works to protect the PROJECT GUTENBERG™
concept and trademark. Project Gutenberg is a registered trademark,
and may not be used if you charge for an eBook, except by following
the terms of the trademark license, including paying royalties for use
of the Project Gutenberg trademark. If you do not charge anything
for copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.
START: FULL LICENSE
THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK
To protect the Project Gutenberg™ mission of promoting the free
distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.
Section 1. General Terms of Use and
Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund
from the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.
1.B. “Project Gutenberg” is a registered trademark. It may only be
used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law
in the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name associated
with the work. You can easily comply with the terms of this
agreement by keeping this work in the same format with its attached
full Project Gutenberg™ License when you share it without charge
with others.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.
1.E. Unless you have removed all references to Project Gutenberg:
1.E.1. The following sentence, with active links to, or other
immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears,
or with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.
1.E.2. If an individual Project Gutenberg™ electronic work is derived
from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.
1.E.3. If an individual Project Gutenberg™ electronic work is posted
with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning
of this work.
1.E.4. Do not unlink or detach or remove the full Project
Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.
1.E.5. Do not copy, display, perform, distribute or redistribute this
electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
More than just a book-buying platform, we strive to be a bridge
connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.
Join us on a journey of knowledge exploration, passion nurturing, and
personal growth every day!
ebookbell.com

More Related Content

PDF
J2EE Developer s Handbook Paul J. Perrone
PDF
Full download Special Edition Using SOAP Special Edition Using John Paul Muel...
PDF
Special Edition Using Soap Special Edition Using John Paul Mueller
PDF
Rest In Practice 1st Ed Jim Webber Savas Parastatidis Ian Robinson
PDF
Special Edition Using SOAP Special Edition Using John Paul Mueller
PDF
Special Edition Using SOAP Special Edition Using John Paul Mueller
PDF
Special Edition Using SOAP Special Edition Using John Paul Mueller all chapte...
PDF
Special Edition Using SOAP Special Edition Using John Paul Mueller
J2EE Developer s Handbook Paul J. Perrone
Full download Special Edition Using SOAP Special Edition Using John Paul Muel...
Special Edition Using Soap Special Edition Using John Paul Mueller
Rest In Practice 1st Ed Jim Webber Savas Parastatidis Ian Robinson
Special Edition Using SOAP Special Edition Using John Paul Mueller
Special Edition Using SOAP Special Edition Using John Paul Mueller
Special Edition Using SOAP Special Edition Using John Paul Mueller all chapte...
Special Edition Using SOAP Special Edition Using John Paul Mueller

Similar to Building Web Services With Java Making Sense Of Xml Soap Wsdl And Uddi 2nd Edition 2nd Edition Steve Graham (20)

PDF
William Stallings - Foundations of Modern Networking_ SDN, NFV, QoE, IoT, and...
PDF
Special Edition Using SOAP Special Edition Using John Paul Mueller
PDF
Computer Networks And Internets 5th Edition 5th Douglas Comer
PDF
Introducing Play Framework Java Web Application Development Second Edition Pr...
PDF
Building Web Services With Java Making Sense Of Xml Soap Wsdl And Uddi 1st St...
PDF
Frontend Development The Ultimate Guide Sufyan Bin Uzayr
PDF
Building Soabased Composite Applications Using Netbeans Ide 6 Frank Jennings
PDF
(eBook PDF) Hands-On Database 2nd Edition by Steve Conger
PDF
(eBook PDF) Hands-On Database 2nd Edition by Steve Conger
PDF
Fundamentals Of Connected And Automated Vehicles Jeffrey Wishart
PDF
Wroxs Sql Server 2005 Express Edition Starter Kit Rajesh George
PDF
Mastering ASP NET with Visual C 1st Edition A. Russell Jones
PDF
Cap Gemini Ernst Young Guide To Gaining Business Value From Mobile Technologi...
PDF
Building Reliable Componentbased Software Systems 1st Ivica Crnkovic
PDF
Developing Enterprise Web Services An Architects Guide Chatterjee
PDF
Developing Java Servlets 2nd Edition James Goodwill
PDF
Mastering ASP NET with Visual C 1st Edition A. Russell Jones
PDF
Special Edition Using Crystal Enterprise 85 Steven Lucas Et Al
PDF
Mastering Jxta Building Java Peertopeer Applications Joe Gradecki
PPTX
An Introduction to Lightning Web Components
William Stallings - Foundations of Modern Networking_ SDN, NFV, QoE, IoT, and...
Special Edition Using SOAP Special Edition Using John Paul Mueller
Computer Networks And Internets 5th Edition 5th Douglas Comer
Introducing Play Framework Java Web Application Development Second Edition Pr...
Building Web Services With Java Making Sense Of Xml Soap Wsdl And Uddi 1st St...
Frontend Development The Ultimate Guide Sufyan Bin Uzayr
Building Soabased Composite Applications Using Netbeans Ide 6 Frank Jennings
(eBook PDF) Hands-On Database 2nd Edition by Steve Conger
(eBook PDF) Hands-On Database 2nd Edition by Steve Conger
Fundamentals Of Connected And Automated Vehicles Jeffrey Wishart
Wroxs Sql Server 2005 Express Edition Starter Kit Rajesh George
Mastering ASP NET with Visual C 1st Edition A. Russell Jones
Cap Gemini Ernst Young Guide To Gaining Business Value From Mobile Technologi...
Building Reliable Componentbased Software Systems 1st Ivica Crnkovic
Developing Enterprise Web Services An Architects Guide Chatterjee
Developing Java Servlets 2nd Edition James Goodwill
Mastering ASP NET with Visual C 1st Edition A. Russell Jones
Special Edition Using Crystal Enterprise 85 Steven Lucas Et Al
Mastering Jxta Building Java Peertopeer Applications Joe Gradecki
An Introduction to Lightning Web Components
Ad

Recently uploaded (20)

PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
Insiders guide to clinical Medicine.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Institutional Correction lecture only . . .
PPTX
Pharma ospi slides which help in ospi learning
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Complications of Minimal Access Surgery at WLH
Insiders guide to clinical Medicine.pdf
Computing-Curriculum for Schools in Ghana
FourierSeries-QuestionsWithAnswers(Part-A).pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
VCE English Exam - Section C Student Revision Booklet
O5-L3 Freight Transport Ops (International) V1.pdf
Supply Chain Operations Speaking Notes -ICLT Program
GDM (1) (1).pptx small presentation for students
Module 4: Burden of Disease Tutorial Slides S2 2025
Pharmacology of Heart Failure /Pharmacotherapy of CHF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Renaissance Architecture: A Journey from Faith to Humanism
Institutional Correction lecture only . . .
Pharma ospi slides which help in ospi learning
102 student loan defaulters named and shamed – Is someone you know on the list?
Ad

Building Web Services With Java Making Sense Of Xml Soap Wsdl And Uddi 2nd Edition 2nd Edition Steve Graham

  • 1. Building Web Services With Java Making Sense Of Xml Soap Wsdl And Uddi 2nd Edition 2nd Edition Steve Graham download https://ebookbell.com/product/building-web-services-with-java- making-sense-of-xml-soap-wsdl-and-uddi-2nd-edition-2nd-edition- steve-graham-2128566 Explore and download more ebooks at ebookbell.com
  • 2. Here are some recommended products that we believe you will be interested in. You can click the link to download. Building Web Services With Java Making Sense Of Xml Soap Wsdl And Uddi 1st Steve Graham https://ebookbell.com/product/building-web-services-with-java-making- sense-of-xml-soap-wsdl-and-uddi-1st-steve-graham-4433816 Building Restful Web Services With Java Ee 8 Create Modern Restful Web Services With The Java Ee 8 Api Paperback Marioleander Reimer https://ebookbell.com/product/building-restful-web-services-with-java- ee-8-create-modern-restful-web-services-with-the-java-ee-8-api- paperback-marioleander-reimer-10416642 Building Restful Web Services With Java Ee 8 Marioleander Reimer Marioleander Reimer https://ebookbell.com/product/building-restful-web-services-with-java- ee-8-marioleander-reimer-marioleander-reimer-7261842 Developing Restful Services With Jaxrs 20 Websockets And Json A Complete And Practical Guide To Building Restful Web Services With The Latest Java Ee7 Api Bhakti Mehta https://ebookbell.com/product/developing-restful-services-with- jaxrs-20-websockets-and-json-a-complete-and-practical-guide-to- building-restful-web-services-with-the-latest-java-ee7-api-bhakti- mehta-5468964
  • 3. Building Restful Web Services With Spring 5 Leverage The Power Of Spring 50 Java Se 9 And Spring Boot 20 2nd Edition 2nd Edition Raja Csp Raman https://ebookbell.com/product/building-restful-web-services-with- spring-5-leverage-the-power-of-spring-50-java-se-9-and-spring- boot-20-2nd-edition-2nd-edition-raja-csp-raman-38560882 Building Web Services With Microsoft Azure Quickly Develop Scalable Restbased Applications Or Services And Learn How To Manage Them Using Microsoft Azure Alex Belotserkovskiy https://ebookbell.com/product/building-web-services-with-microsoft- azure-quickly-develop-scalable-restbased-applications-or-services-and- learn-how-to-manage-them-using-microsoft-azure-alex- belotserkovskiy-5468056 Building Web Services With Abap And Sap Web Application Server 2003 Sap https://ebookbell.com/product/building-web-services-with-abap-and-sap- web-application-server-2003-sap-11146956 Building Restful Web Services With Go Learn How To Build Powerful Restful Apis With Golang That Scale Gracefully 1st Edition Naren Yellavula https://ebookbell.com/product/building-restful-web-services-with-go- learn-how-to-build-powerful-restful-apis-with-golang-that-scale- gracefully-1st-edition-naren-yellavula-52767254 Building Restful Web Services With Net Core Developing Distributed Web Services To Improve Scalability With Net Core 20 And Aspnet Core 20 Gaurav Aroraa Tadit Dash https://ebookbell.com/product/building-restful-web-services-with-net- core-developing-distributed-web-services-to-improve-scalability-with- net-core-20-and-aspnet-core-20-gaurav-aroraa-tadit-dash-11077150
  • 6. Building Web Services with Java Sams Publishing, 800 East 96th Street, Indianapolis, Indiana 46240 DEVELOPER’S LIBRARY M A K I N G S E N S E O F X M L , S O A P , W S D L , A N D U D D I Steve Graham Doug Davis Simeon Simeonov Glen Daniels Peter Brittenham Yuichi Nakamura Paul Fremantle Dieter König Claudia Zentner Second Edition
  • 7. Building Web Services with Java, Second Edition Copyright © 2005 by Sams Publishing All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein.Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omis- sions. Nor is any liability assumed for damages resulting from the use of the information contained herein. International Standard Book Number: 0-672-32641-8 Library of Congress Catalog Card Number: 2004091343 Printed in the United States of America First Printing: July 2004 07 06 05 04 4 3 2 1 Trademarks All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. Warning and Disclaimer Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied.The infor- mation provided is on an “as is” basis.The author and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book or from the use of the CD or programs accompanying it. Bulk Sales Sams Publishing offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales. For more information, please contact U.S. Corporate and Government Sales 1-800-382-3419 corpsales@pearsontechgroup.com For sales outside of the U.S., please contact International Sales 1-317-428-3341 international@pearsontechgroup.com Associate Publisher Michael Stephens Acquisitions Editor Todd Green Development Editor Tiffany Taylor Managing Editor Charlotte Clapp Senior Project Editor Matthew Purcell Indexer Larry Sweazy Proofreader Eileen Dennie Technical Editors Alan Moffet Alan Wexelblat Marc Goldford Kunal Mittal Publishing Coordinator Cindy Teeters Designer Gary Adair
  • 8. Contents at a Glance Introduction 1 I Web Services Basics 1 Web Services Overview and Service-Oriented Architectures 9 2 XML Primer 31 3 The SOAP Protocol 111 4 Describing Web Services 167 5 Implementing Web Services with Apache Axis 233 6 Discovering Web Services 307 II Enterprise Web Services 7 Web Services and J2EE 347 8 Web Services and Stateful Resources 383 9 Securing Web Services 445 10 Web Services Reliable Messaging 507 11 Web Services Transactions 525 12 Orchestrating Web Services 549 III Web Services in the Real World 13 Web Services Interoperability 609 14 Web Services Pragmatics 673 15 Epilogue:Web Services Futures 717 Appendix A Glossary 731 Index 755
  • 9. Table of Contents Introduction 1 I Web Services Basics 1 Web Services Overview and Service- Oriented Architectures 9 What Is a Web Service? 10 Business Perspective 11 Technical Perspective 12 Service-Oriented Architectures 13 Why Is SOA So Important? 15 SOA and Web Services: Related but Distinct 17 Trends in E-Business 17 Why Do We Need Web Services? 18 Scoping the Problem 18 Core Technologies 19 Industry Dynamics 20 What Makes a Good Web Service? 21 The Web Service Opportunity 22 Application Integration 22 B2B 24 Integration of Human Interaction with Systems: B2C 24 Justifying Web Services 25 Web Services Interoperability Stack 26 Transport Layer 27 Messaging Layer 28 Description Layer 28 Quality of Experience Layer 29 Compositional Layer 29 Understanding the Web Services Interoperability Stack 29 Summary 30
  • 10. v Contents 2 XML Primer 31 Document-Versus Data-Centric XML 32 Document-Centric XML 32 Data-Centric XML 33 Document Lifetime 34 XML Instances 35 Document Prolog 35 Elements 36 Attributes 38 Character Data 42 A Simpler Purchase Order 44 XML Namespaces 44 Namespace Mechanism 46 Namespace Syntax 47 Namespace-Prefixed Attributes 49 XML Schemas 51 Well-Formedness andValidity 51 XML Schema Basics 52 Associating Schemas with Documents 54 Simple Types 55 Complex types 59 The Purchase Order Schema 62 GlobalVersus Local Elements and Attributes 63 Basic Schema Reusability 64 Advanced Schema Reusability 70 There’s More 78 Processing XML 78 Basic Operations 78 Data-Oriented XML Processing 81 SAX-Based checkInvoice() 85 DOM-Based checkInvoice() 91 JAXB-Based checkInvoice() 96 Testing the Code 105 Summary 107 Resources 109
  • 11. vi Contents 3 The SOAP Protocol 111 Simple Object Access Protocol (SOAP) 112 What Is SOAP, Really? 113 Doing Business with SkatesTown 114 Inventory Check Web Service 117 Choosing a Web Service Engine 117 Service ProviderView 117 Deploying the Service 118 The ClientView 118 A Closer Look at SOAP 120 The Structure of the Spec 120 The SOAP Messaging Framework 121 Vertical Extensibility 123 The mustUnderstand Flag 125 SOAP Modules 126 SOAP Intermediaries 126 The Need for Intermediaries 127 Transparent and Explicit Intermediaries 128 Intermediaries in SOAP 129 Forwarding and Active Intermediaries 130 Rules for Intermediaries and Headers 130 The SOAP Body 132 The SOAP Processing Model 132 Versioning in SOAP 133 Processing Headers and Bodies 134 Faults: Error Handling in SOAP 134 Structure of a Fault 135 Using Headers in Faults 138 Objects in XML:The SOAP Data Model 141 Object Graphs 141 The SOAP Encoding 143 The SOAP RPC Conventions 148 out and inout Parameters 149 XML, Straight Up: Document-Style SOAP 151 When to Use Which Style 151
  • 12. vii Contents The Transport Binding Framework 152 Features and Properties 153 The HTTP Binding 157 The SOAPAction Feature 158 The Web Method Feature 159 Using SOAP to Send Binary Data 160 SOAP with Attachments and DIME 160 PASWA, MTOM, and XOP 162 Small-Scale SOAP, Big-Time SOAP 163 Summary 165 Resources 165 4 Describing Web Services 167 Why Service Descriptions? 167 Role of Service Description in a Service-Oriented Architecture 168 Well-Defined Service 169 Functional Description 169 Nonfunctional Description 170 Description Summary 170 History of Interface Definition Languages (IDLs) 171 Web Services Description Language (WSDL) 173 WSDL Information Model 174 Parts of the WSDL Language 176 Structure of a WSDL Document: Definitions 178 PortType 179 Operation 180 Message 180 Part 181 Types 184 Binding 186 Port 190 Service 191 Documentation 192 Import 192 Exploring More WSDL Features 195
  • 13. viii Contents Transmission Primitives 201 Rounding Out WSDL Bindings 205 WSDL Extension Mechanism 210 A Sketch of How WSDL Maps to Java 213 Nonfunctional Descriptions in WSDL 214 Policies 214 WS-Policy 216 Policy Assertions 220 Policy Attachments 220 Standardizing WSDL:W3C and WSDL 2.0 223 What’s New in WSDL 2.0 223 Overview of WSDL 2.0 224 A Complete WSDL 2.0 Description 229 Summary 230 Resources 231 5 Implementing Web Services with Apache Axis 233 A Brief History of Axis 234 JAX-RPC, JAXM/SAAJ, and JAXB 234 Current State of the Project 235 Axis Architecture 236 Handlers and Chains: Concepts 236 Server-Side Message Processing 238 Client-Side Message Processing 240 The MessageContext and Its Many Uses 242 The Message APIs and SAAJ 243 A Message by Any Other Name 244 Accessing the SOAP Envelope, Bodies, and Headers 244 The Axis Client APIs 246 The Service Object 246 Using the Call Object for Dynamic Invocation 247 Using Stubs and WSDL2Java 253 Holders: Mapping inout/out Parameters to Java 256
  • 14. ix Contents Web Service Deployment Descriptor (WSDD) 258 Handler Declarations 259 Chain Definitions 260 Transports 261 Type Mappings 262 Building Services 263 Instant Deployment: JWS 263 WSDD for Services 264 Deploying Services and the AdminClient 267 Getting at the MessageContext 268 Service Lifecycle and Scopes 270 Sessions on the Server Side 272 Using WSDL2Java to Generate Services 272 Generating WSDL forYour Services 273 A Guide to Web Service Styles 275 RPC Style 275 Wrapped Style 276 Document Style 277 Message Style 278 From XML to Java and Back Again:The Axis Type- Mapping System 279 Registering Mappings 279 Default Type Mappings 281 Default Type Mapping and XML/Java Naming 283 Custom Serializers and Deserializers 284 Using the MessageElement XML/Object APIs 286 When Things Go Wrong: Faults and Exceptions 288 The AxisFault Class 288 Using Typed Exceptions 289 Axis as an Intermediary 291 Reasons for Roles 291 How to Write a Handler 292 The SkatesTown EmailHandler 292 The SkatesTown GlobalHandler 295
  • 15. x Contents Built-in Security 297 Using the Authentication/Authorization Handlers 297 Understanding Axis Transports 298 Client Transports 298 Server Transports 299 Transports Included with Axis 299 Custom Transports 300 No API Is an Island:Axis and Its Environment 300 Commons-Discovery and Obtaining Resources 300 Logging Infrastructure 300 Security Providers 301 Compilers 301 Development/Debugging Tools 301 The happyAxis Page 301 Configuring Logging 301 Using tcpmon and SOAPMonitor 303 Axis Futures:A Quick Tour 304 Participating in the Axis Community 305 Summary 305 Resources 306 6 Discovering Web Services 307 What Is Service Discovery? 307 Role of Service Discovery in a Service-Oriented Architecture 307 Service Discovery Mechanisms 308 Service Discovery at Design Time and Runtime 309 Scenario Updates 310 UDDI (Universal Description, Discovery, and Integration) 310 UDDI Datatypes 311 Using a UDDI Registry 325 What’s New in UDDIVersion 3.0 335 Using WSDL with UDDI 337
  • 16. xi Contents Other Service Discovery Methods 343 WS-Inspection 343 WS-ServiceGroup 343 Summary 344 Resources 344 II Enterprise Web Services 7 Web Services and J2EE 347 J2EE Overview 347 Containers 348 Enterprise JavaBeans 348 Roles: Development,Assembly, and Deployment 350 Benefits of Using Web Services with J2EE 351 J2EEVersions 353 Using EJBs from Axis 354 The Entity Bean 355 The Session Bean 358 The Deployment Unit 360 Exposing the EJBs via Axis 361 WebSphere Deployment Process 363 EJB Deployment 363 Configuring Axis to Invoke the SkatesService Session Bean 367 EJB Wrap-Up 375 Using JSR109: Implementing Enterprise Web Services 375 Step 1: Creating the WSDL File 376 Step 2: Creating the Deployment Descriptors 376 Step 3:Assembling the Application Files 378 Step 4: Enabling the EAR File for Web Services 379 Step 5: Deploying the Application 379 JSR109 Client Code 380 JSR109 Wrap-Up 381
  • 17. xii Contents Summary 381 Resources 381 8 Web Services and Stateful Resources 383 Web Services and State 384 Aspects of State 384 SkatesTown Scenario 385 WS-Resources 385 Stateful Resources 387 Cardinality of Web Services and WS-Resources 387 Role of WS-Addressing 388 Implied Resource Pattern 391 Modeling Resource Properties 395 What Is a Resource Property? 395 WS-Resource Factory 399 Resource Property Operations 399 Rounding Out the POPortType 412 Using Notifications 412 Base Notification Concepts and Roles 413 Subscribing for Notification 415 The Subscription WS-Resource 419 Topics and Topic Spaces 420 Resource Properties of a Notification Producer 428 The Other Notification Producer Operation: GetCurrentMessage 429 Notification ofValue Changes on Resource Properties 430 Notification Consumers 432 Notification Brokers 433 Resource Lifetime 434 Immediate Termination 435 Scheduled Termination 436 Initializing Termination Time 439 Notification of WS-Resource Termination 440
  • 18. xiii Contents Other WS-Resource Framework Specifications 441 WS-RenewableReferences 442 WS-ServiceGroup 442 WS-BaseFaults 442 Summary 443 9 Securing Web Services 445 Example Scenario 445 Security Basics 446 Security Requirements 446 Cryptography 447 Authentication 450 Security Protocols 451 Security Infrastructures 452 Security Domains 455 Web Services Security 456 Security Model for Web Services 456 Web Services Security Specifications 458 Extended SkatesTown Security Scenario 459 WS-Security 461 Digital Signatures 462 Encryption 466 Security Tokens 471 WS-Trust 474 Public Key Infrastructure 474 Kerberos 476 XML Key Management Specification 479 WS-SecurityPolicy 481 WS-SecureConversation 482 WS-SecureConversation Overview 483 The SSL Protocol 486 Negotiation Protocol Example 487 WS-Federation 492 Enterprise Security 495 J2EE Security 495 Authorization in J2EE 496 J2EE and Web Services Security 498
  • 19. xiv Contents Security Services 500 Summary 502 Resources 502 10 Web Services Reliable Messaging 507 Background of the Web Services Reliable Messaging Protocol (WS-RM) 507 The WS-RM Specification 509 WS-RM Processing Model 510 Client-Side Processing 511 Server-Side Processing 513 Sequence Faults 517 Policy Assertions 518 SpecVersion Assertion 519 DeliveryAssurance Policy 519 SequenceExpiration Policy 519 InactivityTimeout Assertion 520 BaseRetransmissionInterval Assertion 520 AcknowledgementInterval Assertion 520 SequenceRef Element 520 Flaws and Other Thoughts on the WS-RM Spec 521 Putting WS-RM into Use 521 Summary 523 Resources 523 11 Web Services Transactions 525 Web Services Coordination and Transaction (WS-C/Tx) 525 Transactions:A Brief Introduction 527 WS-Coordination 529 The CoordinationContext 530 The CreateCoordinationContext Operation 530 The Register Operation 532 WS-Coordination Fault Codes 536 WS-Transaction:Atomic Transactions 536 WS-AT Operations 537 Commit and Rollback 537
  • 20. xv Contents AT Protocols 538 Two-Phase Commit Protocols 538 Committing the Transaction 539 Transaction Flow Overview 543 Business Activity Protocol 544 Reliable Delivery and Security 545 Summary 546 Resources 547 12 Orchestrating Web Services 549 Why Are We Composing Web Services? 549 Two-Level Programming Model 550 Stateless and Stateful Web Services 550 Evolution of Business Process Languages 550 SkatesTown Requirements 551 Business Process Execution Language for Web Services 552 Design Goals 553 External Interface of a Process 554 Overall Structure of a Process 558 Basic and Structured Activities 561 Process Lifecycle and Related Activities 562 Partner Links 563 Properties and Correlation Sets 565 Invoking Web Services and Providing Web Services 568 Data Handling and Related Activities 572 More Basic Activities: wait, empty 575 Flows 576 More Structured Activities: sequence, while, switch, scope 580 Fault Handling 582 Compensation Handling 585 Event Handling 587 SkatesTown: Putting It All Together 588
  • 21. xvi Contents Advanced Considerations 601 Abstract Processes 601 Language Extensibility 604 Summary 604 Resources 605 III Web Services in the Real World 13 Web Services Interoperability 609 Web Services Interoperability Organization 610 WS-I Basic Profile 1.0 611 Common Requirements for SOAP Envelope, WSDL Document, and XML Schema Document 619 Understanding the WSDL Document Structure 620 Importing XML Schema and WSDL Documents 622 Defining the Service Interface 623 Defining a SOAP Binding 626 Publishing a Service Description 637 HTTP and SOAP Message Content 638 Web Service Security 641 WS-I Conformance Claims 641 Service Provider, Requestor, and Registry Requirements 643 Summary of Basic Profile 1.0 Requirements 645 Future WS-I Profiles 648 Basic Profile 1.1 648 Simple SOAP Binding Profile 1.0 649 Attachments Profile 1.0 650 Basic Security Profile 1.0 660 WS-I Sample Applications 661 WS-I Test Tools 663 Monitor Overview 663 Monitor Configuration File 665
  • 22. xvii Contents Message Log File 665 Analyzer Overview 667 Analyzer Configuration File 667 Test Assertion Document 668 Profile Configuration Report 668 Summary 671 Resources 672 14 Web Services Pragmatics 673 Enterprise Adoption of Web Services 674 Time-Based Adoption Challenges 676 Inherent Limitations of SOA 677 Top-DownVersus Bottom-Up 679 Policies and Processes 682 Putting Web Services in Production 683 Web Services Technology Map 685 System Architectures for Web Services 691 Features, Capabilities, and Approaches 696 Tools and Platforms 696 SOA Testing 697 Deployment and Provisioning 699 Business Process Automation Using Web Services 700 Operations 708 Summary 715 Resources 715 15 Epilogue:Web Services Futures 717 A Roadmap for Web Services 717 Age of Invention (Base SOAP,WSDL, UDDI) 717 Age of Development (from Hype to Delivery) 718 Age of Mainstream Acceptance (Web Services Become Boring) 719
  • 23. xviii Contents Future Trends in Web Services 720 Short-Term Trends and Issues 720 Medium-Term Trends 723 Longer-Term Trends 727 Summary 729 A Glossary 731 Index 755
  • 24. About the Authors Steve Graham is a Senior Technical Staff Member in IBM’s Systems Group and a member of the IBM Academy of Technology. Steve is an architect in the On Demand Architecture group. He has spent the last several years working on service-oriented architectures as part of IBM’s Web Services Initiative and IBM’s On Demand Initiative. Most recently, Steve has applied service-oriented concepts to problems in Grid comput- ing as part of the Open Grid Services Architecture work in the Global Grid Forum. Prior to this, Steve worked as a technologist and consultant with various emerging tech- nologies such as Java and XML, and before that he was an architect and consultant with the IBM Smalltalk consulting organization. Before joining IBM, Steve was a developer with Sybase, a consultant, and a faculty member in the Department of Computer Science at the University of Waterloo. Steve holds a BMath and MMath in computer science from the University of Waterloo and an MBA from the Kenan Flagler Business School at University of North Carolina, Chapel Hill. Doug Davis works as an architect in the Emerging Technology organization of IBM. Previous activities include being the technical lead of IBM’s Emerging Technologies/Web Services Toolkit, being one of IBM’s representatives in the W3C XML Protocol working group, and working on WebSphere’s Machine Translation proj- ect,TeamConnection, and IBM’s FORTRAN 90 compiler. Doug has a bachelor of sci- ence degree from the University of California at Davis and a master’s degree in comput- er science from Michigan State University. Simeon Simeonov is a Principal at PolarisVenture Partners in Boston, where he helps early-stage IT companies accelerate their growth. Prior to joining Polaris, Sim wasVice President of Emerging Technologies and Chief Architect at Macromedia. Earlier, Sim was a founding member and Chief Architect at Allaire. Sim has played a key role in eight v1.0 product initiatives. His innovation and leadership have brought about category- defining products with significant market impact: the first Web application server (Allaire ColdFusion), the best open-source Web services engine (Apache Axis) and the first rich Internet application platform (Macromedia Flash/Flex). Sim has been working with XML and precursors to Web services since 1997 and has developed standards in this space at W3C, JCP, and OASIS. Sim has a master’s degree in computer science from Boston University and bachelor’s degrees in computer science, economics, and mathe- matics from Macalester College. Glen Daniels is the Standards Strategist for Sonic Software, creator of the first Enterprise Service Bus. Glen bridges the gap between Sonic’s development organization and the evolving world of standards. He is one of the primary designers and developers for the Apache Axis project, is a member of the Apache Software Foundation, and partic- ipates actively in organizations like the W3C, OASIS, and the JCP. Prior to Sonic, he was a principal software engineer at Macromedia and Allaire, where he architected new ini- tiatives and helped to bring the company into the Web services era.When not at stan- dards meetings or writing code, he enjoys playing music, cooking, and spending time with his friends, his family, and his two amazing cats.
  • 25. Peter Brittenham is a Senior Technical Staff Member working in the IBM Emerging Technology group. Peter is currently an architect applying service-oriented architecture concepts to IBM’s Autonomic Computing initiative. Prior to this, he was the lead archi- tect for the IBM Web Services Toolkit, which provided a preview of emerging Web serv- ice technologies. Peter also was one of the IBM representatives to the Web Services Interoperability (WS-I) organization. In this role, he was responsible for the architecture and overall development of the first release of the Java version of the WS-I Test Tools. Peter has a BS in business administration from Boston University and an MS in comput- er science from Marist College. Yuichi Nakamura leads the XML & Security group at the IBM Tokyo Research Laboratory. He joined IBM in 1990 and has worked in several areas such as object- oriented systems, multi-agent systems, B2B e-commerce, and knowledge engineering. Since 1999 he has been working on Web services, addressing security, caching, and per- formance.Yuichi contributed to the Apache Axis project during its start-up phase, and he has been contributing to the development of security and cache components for IBM’s WebSphere Application Server. He received an MSc and a PhD in applied physics from Osaka University. Paul Fremantle is a Senior Technical Staff Member in IBM’s Software division, based in the Hursley Park laboratory near Winchester in England. Paul works on IBM’s Enterprise Service Bus initiative and other Web services activities in the WebSphere product. Paul has been working on Web services and XML at IBM since 1999, when he wrote early XML utilities for IBM’s alphaWorks website. Since then he has co-authored The XML Files, an IBM redbook, as well as a number of articles on J2EE and Web serv- ices both in print and on the Web. Paul’s involvement on the WebSphere Application Server includes architectural responsibility for the first SOAP support, the Web Services Invocation Framework, and the Web Services Gateway. Paul is the co-lead of the JWSDL standard in the Java Community Process and has initiated two open-source projects. Paul has an MSc in computation and an MA in mathematics and philosophy, both from Balliol College, Oxford. Dieter König is a software architect for workflow systems at the IBM Germany Development Laboratory. He joined the laboratory in 1988 and has worked on Resource Measurement Facility for z/OS, MQSeries Workflow, and WebSphere Process Choreographer. Dieter is a member of the OASIS WS-BPEL Technical Committee, which is working toward an industry standard based on the Business Process Execution Language for Web Services (BPEL4WS) specification. He holds a master’s degree (Dipl.inform.) in computer science from the University of Bonn, Germany. Claudia Zentner is an architect working for IBM’s Software Group at the IBM Development Laboratory in Böblingen, Germany. Since joining IBM in 1989, she has worked on various middleware projects. For many years Claudia has been focusing on workflow, starting with FlowMark and MQSeries Workflow; currently she is an architect for the process choreography component of the WebSphere Business Integration offer- ing. Claudia graduated in computer science from the University of Cooperative Education in Stuttgart, Germany.
  • 26. Acknowledgments Steve Graham Once again, to Karen, Erin, and Jessie, my family, my inspiration. For all the moments sacrificed to create this book, my most heartfelt thanks for your understanding. My thanks to my co-workers at IBM for providing an excellent environment for creative work. My thanks also to the staff at Sams, particularly Tiffany Taylor and Michael Stephens, for the hard work that went into making this project a reality. Romans 12:2. Doug Davis Thanks to my parents, family, and friends, without whose support and guidance none of the joys in my life would be possible. Lin—thanks to your never-ending patience and understanding, we managed to make it through another one! Sorry for forcing you to learn far more about Web services than you ever feared. :-) Sim Simeonov As always, my deepest thanks to Pyrra: my true love and a constant source of inspiration. Second editions are not easy when the topic of writing is changing as fast as Web servic- es are evolving.Thanks go to all that helped me keep my finger on the pulse of the industry, notably, the good people working with Web services at Service Integrity, WebLayers, Orbitz,Amazon.com, eBay, CA, BMC, IBM, BEA, Microsoft, ZapThink, Burton Group,AT&T, GE, Ford, Bank of America,Wachovia, Fidelity, Morgan Stanley, Merck, and Web Services Journal. Many thanks to Tiffany,Todd, and Mike at Sams for supporting us all the way! Glen Daniels I would like to thank my friends and family (not to mention the rest of the authoring team) for putting up with my overloaded schedule, and everyone at Sams for their great work pulling the book together.Also thanks to all the readers of the first edition who’ve made great comments and suggestions—we hope you like the new one! Peter Brittenham To my wife Abby, and my children Josh, Greg, and Jessica, thank you for your continued patience and support. Yuichi Nakamura To my wife Michiyo, my daughter Arisa, and my son Ryotaro.Thank you for your sup- port and patience. My thanks to my colleagues at IBM for providing this great environ- ment to work on Web services. My thanks also to the staff at Sams,Tiffany,Todd, and Mike. Particularly, I thank Tiffany for her English editing on my chapter.
  • 27. Paul Fremantle To Jane, for being my supporter, friend, and advocate and making me laugh.To my chil- dren Anna and Dan for keeping me sane and driving me crazy.Thanks to my colleagues, especially Sanjiva Weerawarana,Tony Storey, Beth Hutchison, and Chris Sharp, for mak- ing my working environment challenging and fun, and to John Carter for being a great manager while I wrote this book. Finally, thanks to Tiffany,Todd, and Mike at Sams for all their hard work, and to Steve for all his encouragement to us all. Dieter König To my wife Rita and my sons Daniel, Sebastian, Maximilian, and Jonas.Thank you for your patience and support during this adventure. Claudia Zentner To Anneliese, Christian, Marion, and all my friends, thanks for your support and patience.
  • 28. We Want to Hear from You! As the reader of this book, you are our most important critic and commentator.We value your opinion and want to know what we’re doing right, what we could do better, what areas you’d like to see us publish in, and any other words of wisdom you’re willing to pass our way. As an associate publisher for Sams Publishing, I welcome your comments.You can email or write me directly to let me know what you did or didn’t like about this book—as well as what we can do to make our books better. Please note that I cannot help you with technical problems related to the topic of this book.We do have a User Services group, however, where I will forward specific technical questions related to the book. When you write, please be sure to include this book’s title and author as well as your name, email address, and phone number. I will carefully review your comments and share them with the author and editors who worked on the book. Email: feedback@samspublishing.com Mail: Michael Stephens Associate Publisher Sams Publishing 800 East 96th Street Indianapolis, IN 46240 USA For more information about this book or another Sams Publishing title, visit our Web site at www.samspublishing.com.Type the ISBN (excluding hyphens) or the title of a book in the Search field to find the page you’re looking for.
  • 30. Introduction WELCOME TO THE WORLD OF WEB SERVICES! Web services is an evolving collection of standards, specifications, and implementation technologies that are showing great value in the world of application integration and distributed computing.Web services continue to evolve to address more sophisticated computing scenarios, and the authors of this book are excited to bring you into what is widely believed to be the next generation of distributed computing. Before we get going, we need to clarify some things about the purpose and structure of the book. Let’s talk about them now. Goals of This Book The overall goal of this book is to familiarize you with the concept of Web services and what it will take to incorporate Web services as part of your business.We’ll introduce the concept of Web services and give you a framework that describes how you can under- stand the various standards associated with Web services, such as Simple Object Access Protocol (SOAP),Web Services Description Language (WSDL), and Universal Description Discovery and Integration (UDDI).We’ll help position Web services from a business and technical perspective, explaining and demonstrating how Web services can be used to address various business problems. Another goal of this book is to help developers understand the issues and details relat- ed to building Web services using the techniques covered by this book.What pieces are required when you’re planning a Web services strategy? What things do you need to take care of when you’re developing Web services? We provide lots of examples to demon- strate these approaches.We also review in detail the Apache Axis Web services infrastruc- ture with our examples. Assumed Background This book is meant for computing technical professionals with some experience building Web applications and distributed computing systems.You don’t need to be a seasoned veteran of the distributed object wars to appreciate this book, but some familiarity with Web-based architectures and techniques such as HTTP and HTML is assumed. If you don’t have any experience with these techniques, some of the material could be a little confusing—particularly some of the code examples—but you should still be able to get a lot out of the book.
  • 31. 2 Introduction We assume you’re familiar with Java, in particular the Java servlet technology.We also briefly discuss the relationship between Enterprise JavaBeans (EJBs) and Web services, so some familiarity with EJBs is helpful as well. If you need to supplement your under- standing of these techniques, many good books on programming with Java, JSP, servlets, and EJBs are available on the market. You’ll also discover that the Extensible Markup Language (XML) is at the core of all things dealing with Web service.Although we devote an entire chapter to explaining the core pieces of XML needed to build Web services, the more understanding of XML you have, the more successful you’ll be in building Web services. Philosophy The concepts and standards involved in Web services are very much interdependent. It’s difficult to cover each topic in isolation, because it’s the combination of these concepts and standards that makes Web services important to distributed computing. The philosophy of this book can be summarized by four points: pragmatics, progres- sive disclosure, a continuous example, and a service-oriented architecture framework. Pragmatics In this book, we try to get to programming examples and running code as quickly as possible. In particular, we focus on building and consuming SOAP-based Web services using the Java-based Apache Axis Web services infrastructure.Whereas we emphasize that Web services are fundamentally programming language neutral, ultimately, any given Web service is implemented in some programming language technology. In the case of this book, we’ve chosen Java—probably not a surprise to you, given our title.Where issues of interoperability with Web services written in other programming languages appear, we note them. Detailed coverage of other Web services implementation approaches, such as Microsoft’s .NET, is beyond the scope of this book. Progressive Disclosure After an overview of Web services, we start with the fundamentals of XML and then layer on new concepts, motivated by a business computing problem.These layers produce a series of Web services technology stacks. For each of the technologies and standards in the Web services arena, we focus on explaining the technology from the perspective of the problems it solves, balancing the explanation of the technology itself. Business Example The technologies and standards that make up the Web services concept are each exam- ined in the context of an example (which we discuss later in this introduction).The use of the example adds insight to the explanation of Web services in the text of the book and supports the progressive disclosure approach as we follow the example, adding the
  • 32. 3 Introduction layers of Web services technology to the solution.This technique helps position various best-practices approaches to Web service development and deployment.You can down- load the source code for these running examples from www.samspublishing.com.When you reach that page, enter this book’s ISBN number (0672326418) in the search box to access information about the book and a Downloads link. Service-Oriented Architecture The examples and Web services concepts are discussed in the context of Service- Oriented Architecture (SOA), which we introduce in Chapter 1,“Web Services Overview and Service-Oriented Architectures.”We use the SOA framework to help position the various Web services concepts in the context of a bigger picture. Overview of the Book’s Composition This book is divided into three major parts:“Web Services Basics,”“Enterprise Web Services,” and “Web Services in the Real World.” Chapters 1 through 6 describe the core concepts of Web services; you need to have a thorough understanding of this subject matter to be successful with any Web services development project. Chapters 7 through 12 are organized around Web services topics that have an enterprise computing focus. The topics discussed in this section address technical subjects that usually crop up when you’re building “real” information technology solutions.The last part of the book, Chapters 13 through 15, deals with development pragmatics that we’ve gleaned from real-world experience with Web services. Let’s take a closer look at the topics in each of the chapters. Chapter 1 begins the book with an explanation of what the Web services approach is all about.We describe what a Web service is, what standards and technologies are associ- ated with Web services, and what problems can be solved using Web services.We use this chapter to introduce the Service-Oriented Architecture (SOA) conceptual framework and begin to explain how the various Web services standards such as SOAP,WSDL, and UDDI fit together.This chapter will give you a solid conceptual basis for the rest of the book. Before we can get into the core Web services standards, we take a brief side trip to explain XML in Chapter 2,“XML Primer.” Because XML is at the heart of all the Web services standards and techniques, it’s important for you understand it well. XML is a huge topic, but we focus our examination of XML on what you’ll need to know in order to understand the rest of the Web services topics. After the review of XML, Chapter 3,“The SOAP Protocol,” dives in to the core mechanism of invoking a Web service.We review the topic of XML messaging in a dis- tributed computing environment, focusing on the SOAP messaging standard from the W3C. SOAP forms the core basis of communication between a service requestor and a service provider in a Web services environment, and it’s the foundation on which you can build the kinds of business-level extensions we’ll discuss later in the book.
  • 33. 4 Introduction Chapter 4,“Describing Web Services,” introduces the important notion of service description, which is key to making Web services a great application integration technol- ogy for building loosely coupled systems.This chapter discusses how Web services use service description to address the problem of communicating the details the service requestor needs to know about the Web service in order to properly understand how (and why) to invoke it. Chapter 5,“Implementing Web Services with Apache Axis,” refines your understand- ing of SOAP in the context of a particular SOAP infrastructure: the Apache Axis project. This chapter dives into the details of how Axis works and how you can use it to both consume Web services and deploy your own. Now, you need to understand how the service requestor got the service description in the first place. Chapter 6,“Discovering Web Services,” picks up where Chapter 4 left off, discussing the various techniques for Web service discovery, such as UDDI.This chapter examines the standards related to finding what Web services are provided by businesses with which a company might want to collaborate. Chapter 7,“Web Services and J2EE,” adds detail to the core concepts introduced in Chapters 1 through 6.This chapter explains how the Web services concepts map to Java 2 Enterprise Edition (J2EE). Chapter 7 explains how to build Web services using Axis and using the JSR109 Java standard. In Chapter 8,“Web Services and Stateful Resources,” we review how the notion of stateful resources can be combined with Web services, by introducing the concepts of WS-Addressing, a referencing or pointer mechanism in Web services;WS-Resource Framework, a specification for associating Web services with stateful resources; and WS- Notification, a mechanism for doing publish-subscribe style of asynchronous messaging. This work is an emerging standard for use in Grid computing and systems management as well as e-business computing. (For more information on Grid computing, we recom- mend that you browse www.globalgridforum.org.) The very important issue of Web services security is discussed in Chapter 9,“Securing Web Services.”This chapter reviews existing security technologies and takes a closer look at the mapping from Web services security to those technologies.This chapter also reviews how Web services security technologies are integrated into enterprise applica- tions using the J2EE model. In many applications, it’s critical to verify whether a message is sent or received by another party. Chapter 10,“Web Services Reliable Messaging,” explores a Web services specification that was written to try to overcome certain problems with Web services by adding a reliability aspect to SOAP. Chapter 11,“Web Services Transactions,” examines how Web services deal with trans- actions. In an enterprise setting, it’s likely that Web services will need to be invoked and coordinated under the scope of a single unit of work. In this chapter, we examine a group of specifications that describe how to do this with Web services. Web services allow designers to build applications that more closely resemble the business processes they automate. Chapter 12,“Orchestrating Web Services,” describes how to build Web services by coordinating or orchestrating simpler Web services into a
  • 34. 5 Introduction business process (which is also a Web service).This chapter introduces the Business Process Execution Language for Web Services (BPEL4WS) specification. Chapter 13,“Web Services Interoperability,” explores the Do’s and Don’ts of building Web services that interoperate with other Web services.The Web Service Interoperability (WS-I) Organization has developed a series of guidelines that help developers use the Web services specifications in a consistent way across vendors.This chapter examines the work of this organization. Chapter 14,“Web Services Pragmatics,” deals with a list of issues that you may encounter when you’re building and deploying Web services in the real world. Chapter 15 provides a forward-looking epilogue,“Web Services Futures,” which spec- ulates on some possible future uses of Web services technologies. Note This book introduces quite a few terms with which you might not be familiar. We’ve included a glossary at the back of the book that acts as a great reference guide to the terminology we use. We’ll annotate the first use of each term appearing in the glossary using the g symbol. Introducing SkatesTown Before we get started, let’s introduce the fictional company we’ll use for our examples throughout this book: SkatesTown.We’ll follow SkatesTown as the company exploits Web services to improve its business. SkatesTown is a small but growing business in NewYork that was founded by three mechanically inclined friends with a passion for skateboards.They started by designing and selling custom prebuilt boards out of Dean Carroll’s garage, and word soon spread about the quality of their work.They came up with some innovative new construction techniques, and within months they had orders piling up. Now SkatesTown has a small manufacturing operation in Brooklyn, and the company is selling boards, clothing, and equipment to stores around the city. Dean, Frank Stemkowski, and Chad Washington couldn’t be happier about how their business has grown. Of the three, Chad is the real gearhead, and he has been responsible for most of the daring construction and design choices that have helped SkatesTown get where it is today. He’s the president and head of the team. Frank, gregarious and a smooth talker ever since childhood, now handles marketing and sales. Dean has tightly tracked the computer revolution over the years, and he’s chief technical officer for the company. A few years back, Dean realized that networking technology was going to be big, and he wanted to make sure that SkatesTown could catch the wave and utilize distributed computing to leverage its business.This focus turned out to be a great move. Dean set up a Web presence so SkatesTown could help its customers stay up to date without requiring a large staff to answer phones and questions. He also built an online order-processing system to help streamline the flow of the business with
  • 35. 6 Introduction network-enabled clients. In recent months, more and more stores who carry SkatesTown products have been using the system to great effect. Our Story Begins At present, Dean is pretty happy with the way things are working with SkatesTown’s electronic commerce systems. But there have been a few problems, and Dean is sure that the systems could be even better. He realizes that as the business grows, the manual tasks associated with order gathering and inventory resupply will limit the company’s success. Always one to watch the horizon, Dean has heard the buzz about Web services, and he wants to know more.At the urging of a friend, he got in touch with Al Rosen, a con- tractor for Silver Bullet Consulting (SBC). Silver Bullet specializes in Web services solu- tions, and after a couple of meetings with Al, Dean was convinced—he hired SBC to come in, evaluate SkatesTown’s systems, and help the company grow into a Web service–enabled business. As we move through the rest of the book, we’ll keep an eye on how SkatesTown uses technologies like XML and, later, SOAP,WSDL, UDDI, and the rest of the Web services stack to increase efficiency and productivity, and establish new and valuable relationships with its customers and business partners. Silver Bullet, as you’ll see, usually lives up to its name.
  • 36. I Web Services Basics 1 Web Services Overview and Service-Oriented Archectures 2 XML Primer 3 The SOAP Protocol 4 Describing Web Services 5 Implementing Web Services with Apache Axis 6 Discovering Web Services
  • 38. 1 Web Services Overview and Service-Oriented Architectures OKAY, ENOUGH WITH THE HYPE. Some have said that Web services promised to be everything to everyone, but clearly that isn’t going to happen.Where is the business ben- efit behind the Web services technologies? That’s what this book will attempt to explain, in the context of exploring the technologies themselves. Several things do seem to be true: n According to many industry analyst reports,Web services are being used by the vast majority of Fortune 500 businesses. n Web services technology promises to help small and medium businesses participate more effectively in supply chains of large organizations. n Information technology (IT) vendors have adopted Web services (more or less) as a major part of their software strategy. n The Web services industry is dominated by standards activities, minimizing the likelihood of the technology being dominated by a single vendor. That being said, several concerns remain: n Widespread adoption, particularly after several pilot projects are completed, has been slow to happen. Some people speculate that the business climate after 2000 was too conservative, and the dot-com bubble made businesses shy of shiny new technology. n Standards are being developed, but this is happening at a majestic (slow) pace. Tooling and runtime support will follow, but when? Security standards have just recently been finalized, and infrastructure products supporting those standards have yet to be ubiquitously deployed.Additional concerns are lack of finalized reliable messaging and transaction standards. Some analysts claim that the Web services hype wasn’t about the technology’s promise (it’s well positioned to deliver value),
  • 39. 10 Chapter 1 Web Services Overview and Service-Oriented Architectures but rather about the rate and pace of its maturity: It’s a lot harder to get industry standards adopted than it’s to drive proprietary technologies. n Best practices are slow in coming.Without a good base of solid implementation experience, there will continue to be a lot of thrashing around as businesses figure out what to use this technology for. n Business process design is just beginning to take a service-oriented approach. Until this happens, many powerful benefits of Web services won’t be realized. So how can we move forward? We talk about adoption pragmatics toward the end of the book, in Chapter 14,“Web Services Pragmatics”; until then, it’s important for developers to understand the individual technologies and standards that make up the Web services landscape. Discussing these technologies in the context of a scenario, like the SkatesTown scenario we return to throughout the book, is one excellent way to get a basic under- standing of Web services.After you learn the basic concepts, technology, and terminolo- gy, the next step is for you to implement, practice, summarize, and discuss. In this chapter, we’ll provide the basic terminology and set of concepts that put the remainder of the book into context.We’ll define what we mean by a Web service g and describe situations in which Web services play an important role.We’ll describe a simple framework, called service-oriented architecture g, which helps structure the application of Web services technologies.We’ll also provide a framework, in the form of an “interoper- ability” stack that positions how the various Web services technologies including SOAP g, Web Services Description Language (WSDL) g, and Universal Description Discovery and Integration (UDDI) g relate.The rest of the book, then, is an elaboration of the basic concepts presented here. What Is a Web Service? This is a book about building Web services.We can’t describe how to build a Web serv- ice without first clarifying what we mean by Web service. Web services have gained a lot of momentum since the term was introduced in the year 2000. Many software vendors (large and small) have Web services initiatives and products. In fact, some vendors are in the second or third version of their Web services product offerings! Many organizations are involved in the refinement of Web services standards. Early in the evolution of Web services there seemed to be a slow convergence toward a common understanding of what the term means—there was no single, univer- sally adopted definition of what is meant by the term Web service.This situation was rem- iniscent of the early days of object-oriented programming: Not until the concepts of inheritance, encapsulation, and polymorphism were well defined did object-oriented programming become accepted into the mainstream of development methodologies. Several major Web services infrastructure providers published their definitions for a Web service.And through the process of open standards development, a commonly accepted term emerged.The Web services Architecture working group of the World Wide
  • 40. 11 What Is a Web Service? Web Consortium g (W3C, which manages the evolution of the SOAP and WSDL spec- ifications) developed the following definition for a Web service: 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 stan- dards. One important point is that a Web service need not necessarily exist on the World Wide Web.This is an unfortunate historical naming issue.A Web service can live anywhere on the network, Inter- or intranet. In fact,Web services have little to do with the browser- centric, HTML-focused World Wide Web. (Sometimes the names we choose in the IT industry don’t make a lot of sense; they simply take on a life of their own.) Another important point is that a Web service’s implementation and deployment plat- form details aren’t relevant to a program that’s invoking the service.A Web service is available through its declared API and invocation mechanism (network protocol, data encoding schemes, and so on).This is analogous to the relationship between a Web browser and a Web application server:Very little shared understanding exists between the two components.The Web browser doesn’t care if the Web application server is Apache Tomcat, Microsoft Internet Information Services Server, or IBM WebSphere.The shared understanding is that they both speak HTTP and converse in HTML or a limited set of MIME types. Similarly, the Web application server doesn’t care what kind of client is using it—various brands of Web browsers or even non-browser clients.This minimal shared understanding between components allows Web services to form a system of loosely coupled components. Business Perspective Web services have become an important concept for business people; they’re quickly becoming a significant part of a business IT strategy.The vast majority of the Fortune 500 has already adopted Web services in some fashion.Although Web services–based sys- tems are mainly deployed for internal application purposes, a growing minority (around 40–50% according to recent surveys) of companies are beginning to use Web services with their customers, suppliers, and business partners. To a business person, the Web services approach is all about integration: integrating application functionality within an organization or integrating applications between busi- ness partners (in a supply chain, for example).The scenario in this book illustrates this approach.Application integration allows time and cost efficiencies for receiving purchase orders, answering status inquiries, processing shipment requests, and so on.The important point is that application integration is enabled without tight lock-in to any particular business partner. If another supplier has better prices, shipping terms, or quality assur- ance, then a company’s reorder systems can be easily repositioned to use that supplier;
  • 41. 12 Chapter 1 Web Services Overview and Service-Oriented Architectures doing so is as easy as pointing a Web browser at a different Web site.With a broader adoption of Web services and XML document format standards, this style of dynamic business partner integration will become more broadly used.The Web services technolo- gy has become so important in business that it’s even appearing in business school cur- riculums. One of the authors of this book recently completed an MBA degree; Web services were featured in several of the courses! The systems integration thought isn’t new.The IT industry has offered numerous integration technologies; many were proprietary, some were based on open standards. Web services reflect the application of a trend broadly accepted in the IT community: adoption of open standards.With Web services acting as a ubiquitous integration infra- structure supported by most organizations, the task of building cross-organizational information systems (such as a supply chain) becomes much easier and less expensive. When systems are easy and inexpensive to integrate, an organization’s reach to suppli- ers, customers, and other business partners is extended, yielding cost savings, flexible business models, better customer service, higher customer retention, and so on.This fact is driving change in the way organizations think about building IT systems, particularly those involving integration of existing software programs and those of suppliers, cus- tomers, and business partners. Just as IT is fundamental to the efficient operations of an organization,Web services–based systems integration will be fundamental to flexible, lightweight systems integration—for internal application integration within an organiza- tion over an intranet and external partner integration over the Internet or extended vir- tual private network. So, from a business perspective, a Web service is a business process or step within a business process that is made available over a network to internal and/or external busi- ness partners to achieve a business goal.The key is ease of integration, particularly between organizations, allowing business systems to be built quickly by combining Web services built internally with those of business partners. Technical Perspective From a technical perspective, a Web service is nothing more than a collection of one or more related operations that are accessible over a network and are described by a service description.At this level, the Web services concept isn’t new.With Web services, the IT industry is trying to address the fundamental challenge of distributed computing that has been around for decades: locating and accessing remote components.The big difference is that now the industry is approaching this problem using open technology (XML and Internet protocols) and open standards managed by broad consortia such as OASIS g and the W3C. The role of loose coupling can’t be overemphasized. Instead of building an application as a collection of tightly coupled components or subroutines, all of which are well known to the developer at coding time, the Web services approach is much more dynamic.The focus with Web services is on the interface: the contract between a Web service and the component invoking it. Of course, this approach isn’t new; what is new
  • 42. 13 Service-Oriented Architectures is the way that Web services combine the loosely coupled component-based approach to software development with the lessons learned from the World Wide Web—particularly the important role of simple, open standards to achieve ubiquitously deployed infrastruc- ture capabilities. Service-Oriented Architectures Early in the Web services technology evolution, we noticed a pattern that we called service-oriented architecture (SOA). SOA is a simple concept, which makes it applicable to a wide variety of Web services situations. In an SOA, all software components (or functional units that are visible for other entities to invoke or consume over the network) are modeled as services.That is, the architectural premise is that all business tasks or business processes that are built in soft- ware are designed as services to be consumed over a network. In an SOA, the focus of design is the service’s interface.This is similar to component- based software engineering approaches we’ve seen. However, a major difference is that the focus of application design is shifted to composing services invoked over a network. In the SOA approach, the designer isn’t building a program, a functional unit for one purpose/use only; rather, they’re building a service that has a well-defined interface and that can potentially be used in multiple business contexts. Because SOA is focused on building applications using components with well-defined interfaces, it allows applications to be loosely coupled.Applications are integrated at the interface (contract) level, not at the implementation level.This allows greater flexibility, because applications are built to work with any implementation of a contract, not to take advantage of a feature or idiosyncrasy of a particular implementation. For example, dif- ferent service providers (of the same interface) can be dynamically chosen based on poli- cies (such as price, other QoS guarantees, current transaction volume, and so on). Figure 1.1 depicts the main roles and operations in an SOA.Any service-oriented architecture contains three roles: a service requestor g, a service provider g, and a service registry g: n A service provider is responsible for creating a service description g, deploying that service in a runtime environment that makes it accessible by other entities over the network, publishing that service description to one or more service registries, and receiving Web service invocation messages from one or more service requestors.A service provider, then, can be any company that hosts a Web service made available on a network.You can think of a service provider as the “server side” of a client- server relationship between the service requestor and the service provider. n A service requestor is responsible for finding a service description published to one or more service registries and is responsible for using service descriptions to bind to or invoke Web services hosted by service providers.Any consumer of a Web service can be considered a service requestor.You can think of a service requestor as the “client side” of a client-server relationship between the service requestor and the service provider.
  • 43. 14 Chapter 1 Web Services Overview and Service-Oriented Architectures n The service registry is responsible for advertising Web service descriptions published to it by service providers and for allowing service requestors to search the collec- tion of service descriptions contained within the service registry.The service reg- istry role is simple: to be a matchmaker between service requestor and service provider. Once the service registry makes the match, it’s no longer needed in the picture; the rest of the interaction takes place directly between the service requestor and the service provider for the Web service invocation. Service Registry Service Requestor Service Provider Bind Find Publish Figure 1.1 Service-oriented architecture Each of these roles can be played by any program or network node. In some circum- stances, a single program might fulfill multiple roles; for example, a program can be a service provider, providing a Web service to downstream consumers, as well as a service requestor, itself consuming Web services provided by others. An SOA also includes three operations: publish g, find g, and bind g.These operations define the contracts between the SOA roles: n The publish operation is an act of service registration or service advertisement. It acts as the contract between the service registry and the service provider.When a service provider publishes its Web service description to a service registry, it’s advertising the details of that Web service to a community of service requestors. The details of the publish API depend on how the service registry is implement- ed. In certain simple or direct publish scenarios, the service registry role is played by the network itself, with publish being an act of moving the service description into a Web application server’s directory structure. Other services registry imple- mentations, such as UDDI, define a sophisticated implementation of the publish operation. n The find operation is the logical dual of the publish operation. It’s the contract between a service requestor and a service registry.With the find operation, the service requestor states a search criteria, such as type of service, various other aspects of the service such as quality of service guarantees, and so on.The service
  • 44. 15 Service-Oriented Architectures registry matches the find criteria against its collection of published Web service descriptions.The result of the find operation is a list of service descriptions that match the find criteria. Of course, the sophistication of the find operation varies with the implementation of the service registry role. Simple service registries can provide a find operation with nothing more sophisticated than an unparameterized HTTP GET.This means the find operation always returns all Web services pub- lished to the service registry, and it’s the service requestor’s job to figure out which Web service description matches its needs. UDDI, of course, provides extremely powerful find capabilities. n The bind operation embodies the client-server relationship between the service requestor and the service provider. It can be quite sophisticated and dynamic, such as on-the-fly generation of a client-side proxy based on the service description used to invoke the Web service; or it can be a static model, where a developer hand-codes the way a client application invokes a Web service. The key to SOA is the service description. It’s the service description that is published by the service provider to the service registry. It’s the service description that is retrieved by the service requestor as a result of the find operation. It’s a service description that tells the service requestor everything it needs to know in order to bind to or invoke the Web service provided by the service provider.The service description also indicates what information (if any) is returned to the service requestor as a result of the Web service invocation. Each time an SOA is deployed, different technologies may fulfill each role. Chapter 6,“Discovering Web Services,” discusses various options for implementing a service reg- istry and goes into great detail on the UDDI service registry technology. Chapter 4, “Describing Web Services,” discusses service description in detail. Chapters 3 and 5,“The SOAP Protocol” and “Implementing Web Services with Apache Axis,” focus on the use of SOAP to fulfill the bind operation. Chapter 9,“Securing Web Services,” discusses how to make Web services more secure. Chapters 10 and 11,“Web Services Reliable Messaging” and “Web Services Transactions,” describe how to make invoking Web serv- ices reliable and transactable. In Chapter 12,“Orchestrating Web Services,” you’ll learn how to build applications by stitching services together using a workflow technique. The choices of which techniques to use are driven by business needs. How secure does a Web service invocation need to be? There is a price to pay for security (in com- plexity and performance); sometimes it’s worth paying, and other times the risk doesn’t warrant the cost. Is reliable message delivery important? For some Web services invoca- tions, it clearly is; for others, it isn’t obvious that the complexity and the performance price are warranted.The same is true for transactions and the other Web services capabil- ities discussed in this book. Why Is SOA So Important? SOA is an important trend within the IT community.There is a lot of discussion among analysts and developers about the term.Why all the fuss?
  • 45. 16 Chapter 1 Web Services Overview and Service-Oriented Architectures With the SOA approach to application architecture, your view of the entire software portfolio is different. SOA augments and grows your application portfolio. Existing appli- cations can be easily converted to services, to be consumed by existing or new applica- tions.Your portfolio of applications gradually shifts to become a portfolio of components exposed as services and applications composed of services (service orchestrations). Eventually, monolithic, tightly coupled, inflexible applications will be replaced by SOA-architected applications.This won’t happen overnight, but rather will take place in an evolutionary fashion, driven by business needs. With an SOA, organizations will be better able to construct software to integrate business processes and respond rapidly to changes in the business environment: the arrival of a new supplier or competitor, a shift of business model, a postmerger combi- nation of IT assets, the opportunity to outsource a business process, and so on.When parts of the solution to the new business system were built by autonomous organiza- tions, an SOA approach is the best approach to stitch the solution together. More than any technical consideration, this concept of implicit, seamless software integration as a major business benefit is one of the main drivers for service orientation. The SOA approach isn’t lost on vendors of prepackaged software applications. Many major application vendors are at the forefront of Web services standards and SOA prac- tices.The forward-thinking among the software vendors recognize this new SOA emphasis and are incrementally moving their product offerings away from tightly coupled, shrink-wrapped software suites toward more flexible, mix-and-match, loosely coupled SOA architectures of services.This approach will ease their customers’ task of integrating packaged software components with existing business systems and processes. Another important benefit of SOA comes from the notion of bringing IT concepts and business concepts closer together. Previously, technical architectures reflected too much technical detail and hid the underlying business process.With SOA, it’s easier to focus on modeling business processes and tasks as services and building business systems as workflow combinations of these underlying services.With a closer modeling of the business system in technology, it becomes easier to isolate the parts of the system that need changing to reflect those tasks in the business process that need changing.With an SOA approach, technical details of the service are hidden behind the interface, and the designer’s attention is focused on jointly (or unilaterally) designing useful service inter- faces. Thus the combination of a closer IT model of the business, together with loose cou- pling, provides the overall business benefit of SOA.The benefit boils down to good choice of service.What service interface design yields most benefit to the organization, and which is most useful to important service requestors? Which existing applications can be refactored or wrappered as services and let you quickly get to the point of build- ing SOAs from existing IT investments? Which business processes will provide the biggest benefit if they’re built or refactored as services? These are important questions to address when you’re considering adopting SOA.
  • 46. 17 Trends in E-Business SOA and Web Services: Related but Distinct Although Web services and SOA are often thought about in combination, these two terms are distinct. SOA is an architectural concept, an approach to building systems that focuses on a loosely coupled set of components (services) that can be dynamically com- posed.Web services, on the other hand, is one approach to building an SOA.Web servic- es provides a standard for a particular set of XML-based technologies that can be used to build SOA systems. Trends in E-Business Interoperability, particularly between heterogeneous distributed systems components, has been one of the major themes in software engineering in general, and application inte- gration in particular, for the last decade. It’s unfortunate that the seamless interoperability vision is still a dream. Brittleness in all current architectures is preventing software from achieving this vision. Brittleness comes from tightly coupled systems that generate dependencies at every level in the system. One of the most important lessons we learned as developers and architects is that systems need to be able to find resources (software or otherwise) automatically, when and as needed, without human intervention.This ability frees business people to concentrate on their business and customers rather than worry about IT complexities.At the same time, it frees system developers to concentrate on enabling their business and their customers rather than deal with interoperability headaches by writing glue code and patching systems together. Trends in application design are moving from rigid structures to flexible architectures. Trends in business partner interactions are moving from static agreements to more dynamic agreements. In a so-called value-network g approach, competition isn’t between individual companies but rather between value-networks of business partners that can best cooperate and adapt to changing market needs. We’re seeing these trends in many places, from operating system–level systems man- agement efforts such as Grid computing all the way to packaged business application suites.A flexible, dynamically reconfigurable stack of software components is being built, heralding the era when software systems are less brittle and less expensive to configure, maintain, and change. Trends in B2B integration are moving from a proprietary technology-based integra- tion to business process–based integration using open standards.There is a corresponding shift in programming and architecture models to enable these trends: from tightly cou- pled applications to loosely coupled services. On the technical side, major shifts have occurred toward flexibility and interoperabili- ty, through open and widely accepted standards.The first major shift happened almost three decades ago with the advent of TCP/IP as an open platform for networking.This step enabled such important and pervasive architectures as client-server computing. It took the advent of the World Wide Web for the next major shift, with HTML and HTTP providing the first truly universal open and portable user interface. Next, Java gave us truly open portable programming, and finally XML brought with it open
  • 47. 18 Chapter 1 Web Services Overview and Service-Oriented Architectures portable data exchange.The next step in this evolution of open standards is the integra- tion step. How do all these ingredients come together to facilitate the next evolution of e-business? Web services. One aspect of more loosely coupled systems is reflected in the move from Remote Procedure Call (RPC) interfaces toward a messaging or document-centric g model of distributed computing interface.With a document-centric approach, the interface to the Web service becomes much simpler and more flexible.An RPC interface presenting a fixed set of parameters in a fixed order is quite brittle. Small changes to information (for example, a new requirement for an expiration date on a credit card) require a new inter- face to be created, published, and understood by the service requestor.With a document- centric approach, the new information can be added to the document schema defined in the Web service interface. Programs that use the older schema don’t necessarily break when the new XML element is added (this is a property of XML namespaces that you will see in Chapter 2,“XML Primer”).This approach yields Web services interfaces that are much more flexible, resulting in systems that are adaptive. Why Do We Need Web Services? The beginning of this chapter explained the motivation for application-to-application integration over the Internet to address the current challenges of distributed computing and B2B integration in particular. Since late 1999, the software industry has been rapidly evolving XML-based Web services technologies as the approach to solving these prob- lems.Why build a completely new distributed computing stack based on Web services? “Because Web services use XML” isn’t the right answer. It’s a correct observation, but it doesn’t answer the crucial question as to why using XML makes such a big difference. At a basic level, there are three key reasons why existing distributed computing approaches are inferior to Web services for solving the problems of e-business: n The scope of problems they try to address n The choice of available technology n Industry dynamics around standards control and innovation This section will discuss those three key reasons and summarize with a discussion of characteristics of a good Web service. Scoping the Problem Traditional distributed computing mechanisms have typically evolved around technical architectures rather than broader problems of application integration. For example, CORBA evolved as a solution to the problem of implementing rich distributed object architectures.At the time, it was implicitly assumed that this was the right approach to getting applications to communicate with one another.As we discussed earlier, experi- ence has shown that RPCs aren’t always the best architecture for this requirement.The need for loosely coupled applications and business process automation has shown the
  • 48. 19 Why Do We Need Web Services? benefits of exchanging messages containing data (typically a business document) between the participants of e-business interactions, a so-called document-centric approach. Distributed computing specifications address messaging as a computing architecture; however, there has been no unifying approach that brings RPCs and document-centric messaging to the same level of importance—until Web services, that is. Web services have evolved not around predefined architectures but around the prob- lem of application integration.This is an important distinction.The choice of problem scope defines the focus of a technology initiative.Web services technologies have been designed from the ground up to focus on the problems of application integration.As a result, we can do things outside the scope of traditional distributed computing approaches: n Support both document-centric messaging and RPCs n Transport encoded data from both applications and business documents n Work over open Internet protocols such as HTTP and SMTP In other words,Web services are better suited for the task than what we’ve used so far, because we’ve built them with this in mind. COM/CORBA/RMI are great technolo- gies for tying together distributed objects on the corporate network. However, the e- business application integration problem is best tackled by Web services. Core Technologies Because Web services address a much more broadly scoped problem, they use much more flexible technologies than traditional distributed computing approaches. Further, with Web services, we can leverage all that we’ve learned about connecting and integrat- ing applications since we began doing distributed computing.These two factors put Web services on a better technology foundation for solving the problems of e-business than traditional distributed computing approaches. Later, in the “Web Services Interoperability Stack” section, we introduce a hierarchical organization of the technologies and standards associated with Web services. It’s possible to compare the Web services approach to traditional distributed computing approaches level-by-level to see why the technical foundation of Web services is more appropriate for the problems it needs to solve. Rather than going through this lengthy process, let’s focus on two key capabilities: the ability to represent data structures and the ability to describe these data structures. Data encoding is a key weakness for traditional distributed computing approaches, particularly those that are programming language independent. Sure, they typically have a mechanism to represent simple data (numbers, strings, booleans, date-time values, and so on), basic arrays, and structures with properties. However, mapping existing complex datatypes in applications to the underlying data encoding mechanisms was difficult. Adding new native datatypes was practically impossible.The fact that data was encoded in binary formats further complicated matters.
  • 49. 20 Chapter 1 Web Services Overview and Service-Oriented Architectures Web services address these issues by using XML to represent information. XML’s text-based form eliminates byte-ordering concerns.The wide availability of XML pro- cessing tools makes participation in the world of Web services relatively easy. XML’s hier- archical structure (achieved by the nesting of XML elements) allows changes at some level of nesting in an XML document to be made without worrying about the effect on other parts of the document.Also, the expressive nature of attributes and nested elements makes it easier to represent complex data structures in XML than in the pure binary for- mats traditionally used by COM and CORBA, for example. In short, XML makes work- ing with arbitrary data easier. The choice of XML brought another advantage to Web services: the ability to describe datatypes and validate whether data coming on the wire complies with its spec- ification.This happens through the use of XML meta-languages such as XML Schema. Industry Dynamics Momentum is a very important aspect of the dynamics of software innovation. Great problems lead to great opportunities.The desire to capitalize on the opportunities gener- ates momentum around a set of initiatives targeted at solving the problem.This momen- tum is the binding force of our industry.This is how major innovation takes place on a broad scale.The challenge of e-business application integration is great; this is why all the key players in the industry are focused on it. Customer need, market pressure, and the desire to be part of the frontier-defining elite have pushed many companies to become deeply engaged with Web services. Good things are bound to happen. Consider this:The last time every one of the key infrastructure vendors was focused on the same set of issues was during the early days of e-business when the industry was trying to address the challenges of building Web appli- cations.The net result was a new model for application development that leveraged the Web browser as a universal client and the Web application server as a universal backend. In short, trust that some of the very best minds in the industry working together under the aegis of organizations such as the W3C and OASIS will be able to come up with a good solution to the problems of e-business integration. Parallelism is key to building real momentum and increasing the bandwidth of inno- vation.Traditional distributed computing efforts could not achieve this kind of paral- lelism because they were driven either by a single vendor (Microsoft promoting COM, for example) or by a large, slow organization such as the Object Management Group (OMG), which owns the CORBA standards. In both cases, the key barrier to fast progress was the centralized management of standards.Any change had to be approved by the body owning the standard.And Microsoft and OMG owned all of COM and CORBA, respectively. Open-source efforts such as the Linux operating system and proj- ects of the Apache Software Foundation fundamentally generate momentum because people working on them can have a direct influence on the end product.The momen- tum of Web services is real because standardization work is going on in parallel at the W3C, OASIS, and many other horizontal and vertical industry standards organizations.
  • 50. 21 Why Do We Need Web Services? Further, the major players so far have shown a commitment to do a lot of innovation out in the open. The interesting thing from a technical perspective is that XML has something to do with the ability of Web service standardization to be parallelized. XML has facilities (namespaces and schema) that enable the decentralized evolution of XML-based stan- dards without preventing the later composition of these standards in the context of a sin- gle solution. For example, if group A owns some standard and group B is trying to build an extension to the standard, then with some careful use of XML, group B can design the extensions such that: n Its extension can be published independently of the standard. n Its extension can be present in cases where the standard is used. n Applications that don’t understand the extension won’t break if the extension is present. n Applications that need the extension will work only if the extension is present. The industry’s focus on Web services combines the right scope (e-business application integration) with the right technologies (XML-based standards) and the potential for sig- nificant parallelism and high-bandwidth innovation.This is why Web services will be successful. What Makes a Good Web Service? An IT project should exhibit many (but not all) of the following characteristics before you should consider modeling the solution using SOA and Web services: n The problem has a distributed computing nature: parts of the solution exist in multiple network endpoints. n The solution needs to consist of components built and run by different organiza- tions. If there is a single point of control or administration that can resolve any issue that may arise, you have a broad range of solution choices that can be imposed by this single administrative control.A multiplicity of partners favors the dynamic binding nature and XML protocols associated with Web services. n The components that need to be integrated have heterogeneous platforms (operat- ing system, application server, programming language). n The business process should be automated; various characteristics of the solution can’t require a human interaction for each step. If a human can be involved, stan- dard World Wide Web technologies such as browsers, JSPs, and servlets will do. n The business process, and/or the set of components that make up the business process, change with some frequency. For a dynamic business environment, a flexi- ble solution is required. n The business process needs to be policy driven; decisions made within the logic of the business process need to be based on externalizable policies (which may them- selves change with some rapidity).
  • 51. 22 Chapter 1 Web Services Overview and Service-Oriented Architectures n The business process isn’t core and has the potential for outsourcing.With a Web services approach, outsourcing the business process minimizes the perturbation to those systems that interface with the outsourced process. n Data needs to be available to more than just the core applications that generate/maintain the data. Rapid situation detection and response decision- making may require accessing data in non-traditional ways.Web services is a simple approach to making information accessible to all sorts of different requestors. The Web Service Opportunity The Web services approach is an application integration concept; it’s a set of technologies that provides access to business functionality, such as purchase order processing. Often, the business functionality already exists in the form of legacy transaction processing sys- tems, existing Web applications, Enterprise JavaBeans, and so on.Web services technology is about access and application integration; it isn’t an implementation technology. Organizations use Web services technology in two broad categories: application inte- gration and business-to-business (B2B) partner integration over the Internet. In either of these categories,Web services can range in sophistication from simple request/response functions such as a credit card check to complicated multi-party, multi-stage, long- running business transactions such as a supply configuration and order system.Web services can be invoked by PC-based programs, mainframe systems,Web browsers, or even small mobile devices such as cell phones or personal digital assistants (PDAs). In addition to application integration and B2B, we’ll discuss another growing use of Web services: B2C, or building systems with a human interface component using Web services. Application Integration Gartner defines application integration as “making independently designed application sys- tems work together.”The need for better-integrated applications is huge. Here are just a few examples from the public Internet and corporate networks: n Forrester estimates that more than 50% of Fortune 1000 enterprises have over 50 legacy or packaged applications that need to be integrated—in spite of the func- tional and business needs.The opportunity cost of not integrating these applica- tions is huge. n CIO Magazine’s Tech Poll recently showed that more than 85% of surveyed com- panies have an IT application backlog, weighed heavily toward integrating existing systems as opposed to buying new systems. n Have you ever forgotten some of your passwords? If single sign-on (SSO) is broad- ly deployed, you won’t have to remember so many passwords.
  • 52. 23 The Web Service Opportunity n Have you ever chosen not to buy from a Web site offering you the best terms because you didn’t have an account set up and you didn’t want to spend the time registering? If eWallets work broadly on the Web, this won’t be a problem. n Email is the life blood of companies. Much relevant business information is sent and received through email, often outside the context of enterprise systems.A whole industry of companies has sprung up to address this lack of integration across multiple domains: sales automation, collaboration, resource planning, and so on. n One large financial institution takes more than a week to process a change of address.The institution thinks that it can generate up to 10% more profit per cus- tomer if only it can process the change in less than 24 hours. It’s been trying for years to integrate several applications to do this without success. End users, IT, and business executives want more integration and information leverage between the applications they use every day. IDC estimates that the size of the applica- tion integration software market in the United States is approaching $5 billion.The United States systems integration (consulting) market, at the same time, was about $38 billion. Most of that is pure labor (as opposed to hardware and software) cost, and much of it is spent on integrating systems as opposed to building new systems.Two things become clear from this analysis: First, the total market size for integration is tens of bil- lions for the United States alone. Second, services and not products account for the majority of that amount. To harness the value potential of applications, we need much more integration.The only way to achieve this is to significantly lower the cost of integration across the board. There is a problem, however:The low product-to-service ratio in the integration space puts a constraint on both the rate of growth of the market and the cost of integration projects. Screen scraping, data mapping, and building bridges between incompatible APIs aren’t scalable activities—they require trained personnel and a lot of time.When technol- ogy picks up its pace, IT services can’t keep up. Unless enterprises fundamentally change their dependence on integration services, they won’t be able to leverage the powerful trends in computing, storage, connectivity, and standardization. Nor will they be able to leverage the full value potential of integrated distributed applications. Companies will be stuck with integration backlogs that forever exceed their resources, both monetary and human. The Web services approach offers an attractive set of technologies by which existing legacy systems can be wrappered as Web services and made available for integration with other systems within the organization.Applications exposed as Web services are accessi- ble by other applications running on different hardware platforms and written in differ- ent programming languages. Using this approach, the complexity of these systems can be encapsulated behind industry-standard XML protocols. Pair-wise system integration projects can be replaced with one-to-many systems interactions based on Web services. The promise of higher-level interoperability initiatives is that over time we’ll be able to
  • 53. 24 Chapter 1 Web Services Overview and Service-Oriented Architectures develop the set of standards, technologies, and tools that will enable small and large busi- nesses to easily integrate systems internally; then they can mix and match the implemen- tation of various activities within a business process, maintaining the option to outsource any or all of these activities if doing so makes business sense. B2B Another key driver behind the rise of Web services is the continuing evolution of B2B computing. B2B computing is about integrating the business systems of two or more companies to support cross-enterprise business processes such as supply chain manage- ment. B2B applications can be as simple as automated credit card validation or as com- plex as the full automation of the multi-billion-dollar supply chain of a Fortune 100 company.The challenges of building B2B applications combined with their huge market potential drove rapid innovation that has taken the industry from simple business-to- consumer (B2C) g applications to SOAP-enabled Web services in a matter of five years. Integration of Human Interaction with Systems: B2C Online HTML-based applications are consumer oriented.The classic example of a B2C Web application is the Amazon book search.To access this functionality, a human being needs to use a Web browser to navigate the company’s site through multiple page transi- tions, input information using Web forms, submit them, and get the results back in human-readable form.The only way to automate this process is to simulate how a human uses the system. Doing so involves reverse-engineering the Web application to see how it moves data between pages, passing the data automatically from page to page, and, finally, parsing any data contained in the response HTML of pages.This screen- scraping approach was popular in the early years of the Web (1995–97), but it’s very error prone.The only true way to integrate applications on the Web is to use a B2B- focused solution. Because B2B applications are designed to have other applications as their clients, they’re fundamentally different from B2C applications.Table 1.1 summarizes some of these differences for Java applications. Both types of application are unrestricted as to the type of backend they can use—typically, Java classes or Enterprise JavaBeans (EJBs). (We discuss how Web services work with EJBs in more detail in Chapter 7,“Web Services and J2EE.”) This is where the similarities end, however. To customize backend logic, B2C applications use servlets or Java ServerPages (JSPs) hosted in a servlet engine. B2B applications customize their backends using straight Java code (often EJBs) hosted inside a Web service engine. B2C applications communicate with a browser over HTTP. B2B applications can use any of the open Internet protocols such as HTTP, SMTP, or FTP, or proprietary networks such as EDI. B2C applications handle data over the straight HTTP protocol. Input comes as GET parameters (on the URL/query string) or as POST parameters from Web forms. Only strings can be exchanged; any other datatypes, even numbers, need to be encoded as strings. For out- put, data is mixed together with formatting rules inside HTML pages.This is in marked
  • 54. 25 Justifying Web Services contrast with B2B applications, which use XML for both data input and output. XML is perfect for B2B computing because it’s programming language- and platform-neutral, it can represent arbitrary data structures, it’s easy to process, and it can be validated inde- pendently of its processing. B2C applications need a UI (typically HTML, although some use Java applets) because their clients are humans. B2B applications have no UI because their clients are other applications. Table 1.1 Comparing B2C and B2B Java Applications Area B2C Application B2B Application Backend logic Java classes and EJBs Java classes and EJBs Controller logic Servlets and JSPs Web service engine Communication protocol HTTP HTTP/S, SMTP, FTP,TCP/IP, EDI, JMS, RMI/IIOP… Data input HTTP GET/POST XML parameters Data output HTML XML UI HTML + script N/A Client Human behind a browser Software application Justifying Web Services Information technology investments must be evaluated against all other competing potential uses of a firm’s capital and other resources.This evaluation usually involves doing a net present value analysis to determine a dollar value of the costs and the benefits over time, and distilling this analysis into a single current value that can be compared with other investments. If the estimated value of the benefits doesn’t exceed the cost, the project isn’t financially justifiable. The task is to understand the categories of costs and benefits for a Web services proj- ect.We’ve outlined some of the benefits in this chapter; they’re summarized as follows: n Application integration can be done in a faster and cheaper manner. n Application integration can be done in ways that were hard to cost-justify with previous technologies. For example, the platform neutrality of Web services allows designers to combine business systems with all sorts of devices (such as PDAs, cell phones, normal desktops, server-based applications) with service providers of all shapes and sizes from small ones (such as radio frequency ID tags) to more tradi- tional Web applications and mainframe systems. n Time to market is reduced for new IT systems that support new or modified busi- ness processes.This is largely achieved by wrappering existing functionality. If the function exists, but only in a form that’s hard to integrate, a simple adapter or wrapper function will quickly and cheaply enable other applications to exploit the existing function.
  • 55. Other documents randomly have different content
  • 56. apartment, and around this they at once assembled, while Nenci, opening the lady’s dressing-bag which he carried, took therefrom a small oblong box of polished oak, which he set upon the table, afterwards displaying the exquisite replica of the bust of the reigning sovereign of Italy. “Beautiful!” they all cried with one accord. “Nothing could be better!” “Its action is marvellous,” Malvano explained. “We have already tried it. The effect is frightful. When set, it contains explosives enough to reduce every house in this street to ruins.” They looked at one another and shuddered. “It’s really very inoffensive-looking,” her ladyship remarked, raising her glasses, deeply interested. “I hope it isn’t charged!” “Oh dear, no,” Nenci laughed, taking it in his hand. “I’ve brought it here to show how the mechanism is contrived;” and bending towards her, he opened its malachite base, showing the empty receptacle for the explosive compound, the hole for the tiny tube of acid, and the small clockwork mechanism no larger than a watch imbedded deeply in cotton-wool, so as to be noiseless. Standing at the table, he glanced keenly from one to the other as he explained its working. As he handled the bust tenderly, his keen black eyes seemed to shine with an evil light. When he had concluded, he replaced the mechanical portions he had removed, and put the bust back into the dressing-bag beside him. “No, no,” Malvano said, smiling grimly, some minutes later. “Don’t hide it away, Lionello. It’s well worth our admiration,
  • 57. and does you credit. This is the last time we shall have an opportunity of seeing it, so let it remain on the table.” All joined in a chorus of laughter and approbation, and Nenci, fumbling in the bag at his side, reproduced it and placed it upon the table in full view of their gaze. At that moment Gemma, deep in conversation with her ladyship, did not notice that the bust was before them, and not until Nenci and Malvano had left the room together in order to consult with the foppishly dressed young man outside in the drawing-room, did she detect its presence. Then, with a sudden scream of wild alarm, she dashed forward, her bare arms raised in despair, crying— “Look! Look! This is not the bust he showed us at first, but another! This one is charged! Fly quickly—all of you! In another instant this house will be in a mass of ruins, and we shall all be blown to atoms! This is Nenci’s diabolical vengeance!” With one accord they sprang from their chairs and rushed towards the door. Tristram was the first to gain it, turned the handle. “God! It’s locked!” he shrieked. Nenci, the sinister-faced man who, with his two infamous companions, had secured them in that room with the frightful engine of destruction in their midst, had ingeniously escaped. Speechless, with faces blanched, they exchanged quick apprehensive glances of terror. Those moments were full of terrible suspense. All knew they they were doomed, and appalled, rooted to the spot by unspeakable terror, none dared to move a muscle or touch that exquisite bust upon the table. Each second ticked out clearly by the Sèvres clock upon the mantelshelf brought
  • 58. them nearer to an untimely and frightful end; nearer to that fatal moment when the tiny glass tube must be shattered by the internal mechanism, and thus cause an explosion which would in an instant launch them into eternity.
  • 59. Chapter Twenty Nine. Entrapped. As all drew back aghast and terrified from the little face of carved stone, Gemma, who had tried the door only to discover the truth of Tristram’s appalling assertion, dashed instantly back to the table, and, regardless of the imminent risk she ran, took the small image in her hands. “No, no!” they cried with one voice, haunted by the fear that at any second it might explode and blow them out of all recognition. “Don’t touch it! don’t touch it!” “On the night when the two men completed their hellish invention, I watched through the shutters unseen,” she cried. “I saw Nenci explain how this deadly thing was charged, and the mode in which it was set. See!” In an instant all had grouped round her, as, turning the bust upside down, she eagerly examined it beneath the shaded lamp. The scratch running across the malachite base and up the outer edge of the removable portion was, she saw, contiguous to a mark higher up. Nenci had turned the circular base until the ends of the almost imperceptible line had joined. Another instant and nothing could save them. With trembling hands Gemma grasped it, as Nenci had done on the night when she had watched, and with a quick wrench tried to turn it back. It would not move!
  • 60. Next second, however, she twisted it in the opposite direction. As she did so there was a harsh grating sound, as of steel cutting into stone, a crack, as though some strong spring had snapped; and then all knew that the mechanism of the devilish invention had been disordered, and the frightful catastrophe thereby averted. She bent down, opening Nenci’s bag, and took therefrom a second bust, exclaiming— “He tricked us cleverly. Fortunately, however, I detected the difference in the markings of that green stone, or ere this we might each one of us have been dead.” Then, placing the two busts side by side, she pointed out the difference in the vein of the malachite which had attracted her attention, and thus caused her to make the astounding declaration which had held them petrified. “You’ve saved us!” the Gobbo cried, addressing her. “These men must not escape,” Gemma cried determinedly. “They shall not! Our lives have been endangered by their villainous treachery, and they shall not evade punishment.”
  • 61. Chapter Thirty. “I Bear Witness!” Next morning Gemma stood at the window of her bedroom, looking down upon Northumberland Avenue. She had breakfasted unusually early, and had chosen a dark-green dress trimmed with narrow astrachan—one of her Paris- made gowns which she knew fitted her perfectly and suited her complexion. She had stood before the long mirror in the wardrobe for some minutes, and, with a pride that may always be forgiven in a woman, regarded herself with satisfaction. They knew how to make a woman look her best in the Rue de la Paix. The recollection of the previous night was, in the light of morning, horrifying. After leaving Sussex Square, she had stopped her cab at the telegraph office opposite Charing Cross Station, the office being open day and night, and had sent a long and urgent message to Rome explaining the situation. Already a reply reposed in the pocket of her gown, but it was unsatisfactory. The private secretary had wired back that the Marquis was away at his high-up, antique castle of Montelupo, “the Mountain of the Wolf,” between Empoli and Signa, in Tuscany. She therefore knew that many hours must elapse ere her cipher message was delivered to him. Even his reply could not reach her for four hours or so after it had been despatched from Empoli. But after sending the message to Rome, she had also sent one to Armytage at Aldworth Court, and was now awaiting his arrival. Her hands were cold and nervous, her eyes heavy and weary, and her face deathly pale and haggard, for she had
  • 62. slept but little that night. She saw plainly that all her desperate efforts to free herself had been in vain. There had been a hitch somewhere, or that night the whole of that assembly at Lady Marshfield’s would have been arrested by detectives from Scotland Yard, at the instigation of Count Castellani, acting under telegraphic orders from Rome. Italy would thus have been able to rid herself of as desperate a gang of malefactors as ever stood in the dock of a criminal court. She had kept faith with the Marquis Montelupo, her master, and, in order to gain her freedom, had furnished the Ministry with full details of the plot. Her freedom of action had been promised her in exchange for this information, but with the stipulation that the conspirators must be arrested. The Marquis, cunning and far-seeing, was well aware that this would ensure greater secrecy, and hold her as his agent until the very end. No arrest had, however, taken place. All her plans had failed utterly, and, in a paroxysm of despair, she told herself that she was still, even at that moment, as far off gaining her freedom as ever she had been. Her tiny white hands clenched themselves in despair. “I love him!” she murmured hoarsely. “I love him; but Fate always intervenes—always. Shall I never be released from this terrible thraldom? I pray day and night, and yet—” She paused. Her eyes fell upon the small ivory crucifix standing upon a pile of books beside her bed. She sank upon her knees, clasped her hands, and her thin white lips moved in fervent prayer. Suddenly, while her head was still bent upon her breast in penitence, as she craved forgiveness for violating the oath she had taken to these men who sought her death, a
  • 63. master-key was placed in the door and the chambermaid entered. “Pardon, Madame,” the girl exclaimed in French, drawing back as soon as she saw her, “I thought you had gone out. A gentleman has just been shown to your sitting-room, and is waiting.” “A gentleman!” Gemma repeated blankly, rising to her feet. Then she recollected. It was her lover who had come in response to her telegram. What could she tell him? “Very well,” she answered. “I’ll see him at once;” and as the girl withdrew, she stood looking at herself despairingly in the mirror. Again she dare not tell him anything. She was still beneath a double thraldom of guilt. With both her hands she pushed back the mass of gold- brown hair from the pale fevered brows, sighing; then, rigid and erect, walked down the corridor to her own sitting- room. Her heart beating wildly, but with a glad smile upon her face, she entered. Instantly she halted. Her look of pleasure gave place to one of hatred. Her visitor was not Charles Armytage, but the man who, only twelve hours before, had secured her and her companions within that room with the terrible engine of death in their midst. It was Lionello Nenci, who stood with his back to the window, his hands idly in his pockets. His sallow face was that of a man haunted by terror, and driven to desperation. His cheeks were pale beneath their southern bronze, and his black eyes glittered with unnatural fire as he advanced towards her. “You!” she gasped in withering contempt. “You! The mean despicable cur who sought to kill us!”
  • 64. “Yes!” he answered unabashed. “Shut the door. I want to speak to you.” In involuntary obedience she closed the door, and the portière fell behind her. “I should have thought, after your infamous conduct last night, you would not ever dare to face me again,” she cried in scorn. “Such treachery is only worthy of gaol-birds and traitors.” “You deserved it,” he laughed roughly. “You are one of the latter. It was you,” he went on mercilessly—“you, with your innocent-looking face, who gave the whole plot away, who exposed us to the Ministry, and put the English police upon us; you who sought our arrest and punishment. It is but what was to be expected of such a woman as yourself, the spy and mistress of Montelupo.” “Mistress!” she echoed, in an instant frenzy of passion. “I’m not his mistress. I swear I’ve never been. You know that’s a foul lie!” “Every one in Italy believes it,” he said, with a brutal laugh. “When they know that you were implicated in the plot, and gave it away to him, it will confirm their suspicions.” She looked at him, intense hatred in her glance. “And you have come here to tell me this!” she cried. “Having failed in your dastardly attempt last night, you come here to-day to taunt me with the past!” “No. The reason I’ve called is to calmly explain the position. The police are already upon us, but the Doctor and Romanelli have left London. I unfortunately, am unable, for
  • 65. I’ve no money,” he added, in a whining tone. “I’ve come to throw myself upon your generosity; to ask you for some.” “You wish me, the woman whom you denounce as a spy and traitor—whom you and your infamous companions endeavoured to kill—you ask me to furnish you with funds so that you may escape the punishment you deserve?” she cried in scorn, amazed at his boldness. “I shall not stir a finger to save you,” she answered promptly. “Come,” he said. “There’s no time to lose if I’m to escape. Remember, I’m the man for whom the police of Europe have been searching in vain these last two years, ever since I escaped from Elba; and if I’m again to evade them, it will be expensive. If you’re not prepared to sacrifice yourself, then give me money and let us part. You are rich, and can well afford it,” he added. “Come. Take my advice, and let the whole thing end here. Assist me this, the last time, and I swear to you that I’ll say nothing implicating you, even if afterwards I’m arrested.” “If I give you money, it is on the understanding that you will not in future levy blackmail,” she said, eyeing the cringing man before her with contempt. “Recollect that any communication from you will result in your immediate arrest. You know, one word from me at the Ministry and the police will follow you, wherever you may be.” “I agree,” he cried eagerly. She drew from her purse three English notes, each for five pounds, and handing them to him said— “This is all the money I have at the moment, without drawing a cheque.”
  • 66. “It’s not enough—not half enough,” he declared in a tone of dissatisfaction, glancing at the clock. “There’s little time to lose. A North German Lloyd boat sails from Southampton for New York this afternoon, and the train leaves Waterloo at noon. This money won’t even buy my passage and necessaries.” She reflected for an instant, and glanced down at her fragile hands. An instant later, in sheer desperation, she cried— “Then take my rings!” And twisting them one by one from her fingers, including the antique one of turquoise and diamonds, she laid them, together with her brooch, on the little writing-table where they were standing. “They’re worth at least five thousand francs,” she said. “Take them, sell them, do what you like with them, but never let us meet again.” Eagerly he took up one—a beautiful diamond half-hoop ring, and glancing at it in admiration, was about to place it in his vest-pocket, when there came a loud rap at the door, and the message-boy, shouting her hotel number, ushered in two men. Nenci turned quickly towards the door, and shrank back in terror and dismay. The men who entered were Tristram and Armytage. The face of the latter was dark with determination. He had not expected to find Gemma with a stranger; moreover, the fact that her rings and brooch lay upon the table between her and her visitor puzzled him. “Ah, dearest!” she cried, rushing towards him, her nervous hands outstretched. “You have come back to me at last—at last!”
  • 67. Without taking her proffered hands, he looked straight into the sallow, evil face of the Italian. Nenci boldly met his gaze. “This is the scoundrel who, as I’ve just told you, endeavoured last night to destroy Gemma, myself, and several other persons at Lady Marshfield’s?” Tristram cried, glaring at the black-haired inventor of the terrible engine of death. “And this,” retorted Nenci, pointing at the Captain—“this man is a murderer! It was he who killed Vittorina Rinaldo!” “You’re a liar?” Tristram answered, his face livid and set. “The evidence against me is circumstantial enough, perhaps, to convict me of the crime, but I am innocent— absolutely innocent. I myself was the victim of a dastardly plot. Little dreaming of what was intended, I escorted her from Leghorn to London, and thus unwittingly myself created circumstances which were so suspicious as to fasten the terrible guilt upon me. But I declare before Heaven that I’m in ignorance of both the motive and the secret means by which the crime was accomplished!” The outlaw laughed a harsh, dry laugh. His demeanour at the first moment of their entry into the room had been one of fear. Now he was fiercely defiant, and affected amusement at their demeanour. “If you can prove your innocence, then do so,” he said grimly. “According to the papers, you left the cab, entered the bar, spoke to your accomplice, the Major, whoever he was, and then escaped by the back entrance.” “True,” replied the King’s Messenger. “But my hurried flight had nothing whatever to do with the murder of Vittorina, nor did my conversation with the Major bear upon it in any
  • 68. way whatever. I merely expressed surprise at meeting him there after leaving him at the station; and he, too, was surprised to see me. Then, while in the bar, I suddenly recollected that, in the hurry of alighting from the train, I had left in the carriage a despatch-bag given me by one of the messengers of the Embassy in Paris to convey to London; and knowing that the train would be shunted out, perhaps down to the depot at Nine Elms, I made all speed back to Charing Cross, where I found that a porter had already discovered it, and taken it to the lost-property office. I had no fear of Vittorina’s safety, for I had already given the cabman the address in Hammersmith, and every second was of consequence in recovering my lost despatches.” “But the Major’s photograph was discovered in Vittorina’s bag,” Nenci cried in a tone of disbelief. “How do you account for that?” “I don’t know. To me, that fact is a mystery, although I have since entertained a suspicion that the Major, when he met me, must have been aware that the girl’s life was to be taken. He called upon me afterwards, and we were both afraid of arrest upon circumstantial evidence. I was aware that he was implicated in some shady transactions in the City, for he confessed to me his intention of leaving England secretly.” “Your story is ingenious enough,” Nenci replied, “but it will never convince a jury of your innocence. You can’t clear yourself. It’s absolutely impossible.” “One moment,” interrupted Armytage, who, standing beside his well-beloved, had been intently watching the face of this desperate malefactor during this argument—“one moment,” he said coolly. “This visit is a very fortuitous circumstance.
  • 69. A face such as yours, one never forgets—never. We have met before.” “I think not, signore,” the other answered, smiling with that ineffable politeness which so often nauseates. “I haven’t the pleasure of knowing you, save that I presume you are the affianced husband to the Signora Contessa.” “But I know you, although it isn’t much of a pleasure,” Armytage answered quickly, in a voice that showed that he was not to be trifled with. “You declare that we’ve never met before. Well, I’ll just refresh your memory,” he went on, slowly and deliberately. “One night, the night previous to leaving for Italy, while passing the Criterion on my way from the Junior United Service to the Alhambra, I saw a cab stop and my friend Captain Tristram alight and enter the bar, when almost next moment a man brushed past me. Beneath the electric light I saw his face distinctly. I saw him raise his hat, mount the step of the cab, shake hands cordially with the girl sitting inside the vehicle, and at once dart away. I didn’t enter the Criterion, as I had an appointment with a man at the Alhambra, and was late. Next morning, however, when in the train between London and Dover, on my way to Italy, I read in the paper that the girl I had seen had been murdered.” He paused for an instant to watch the effect of his words; then declared, in a voice which betrayed no hesitation. “The man who brushed past me and mounted on the steps of the cab was you! It was you who killed her!” The colour died from Nenci’s face. He tried to speak. His lips moved, but no sound escaped them. This unexpected denunciation fell upon him as a blow; it crushed him and held him speechless, spell-bound.
  • 70. “Is it really true?” cried the Captain, open-mouthed, as astonished as the murderer himself. “This man before you was the murderer. To that I bear witness!” Armytage replied. “She was going to his house at Hammersmith,” Tristram said, perplexed. “There must have been some motive in killing her before she arrived there.” “Of course. It’s easy to discern that such a crime allayed all suspicions. No one would dream that the man calmly waiting at home expecting her arrival was actually the man who murdered her.” The dark-faced outlaw, watching the two men with covert glance, made a swift movement towards the door. But Tristram was too quick for him, and springing forward, placed his back against it, saying— “No, when you leave this room you will be accompanied by a constable. It isn’t safe to trust you out alone.” Then, turning to his old college friend, he added, “What you’ve just said, Armytage, has renewed life within me, old fellow. I knew I was the victim of some foul plot or other, but I never suspected this man of being the actual assassin. His character’s desperate enough, as witness his mean, dastardly attempt upon us last night; but I never dreamed it possible for a man to commit murder so neatly as he did.” “You are determined to keep me here?” Nenci cried, his eyes glaring savagely like an animal brought to bay. “I am determined to give you up to the police,” Tristram answered. “Remember, I am suspected, and I now intend to clear myself.”
  • 71. “And risk arrest for the conspiracy.” “There’s no proof that I was ever associated with you,” the Captain answered. “The word of a murderer isn’t worth much.” “You are prepared for the revelations that I can make?” “I’m prepared for anything so long as you meet with your deserts,” the Captain responded. For an instant the wretched man, his sallow face haunted by a look of unutterable dread, glanced from one to the other. Then, convinced that all were determined, and realising that escape was now utterly impossible, he stepped forward, and, snatching up from the table the antique ring set with the turquoise and diamonds, with a quick movement slipped it upon the little finger of his left hand. They watched him in wonder. “You think to have a magnificent revenge,” he cried, glaring wildly at them. “But I will cheat you yet. Watch!” And with the thumb and finger of his right hand he pressed the large turquoise. From beneath the ring there escaped a dark-red bead of blood. “Go!” he shrieked hoarsely, his face haggard, deathlike. “Go, call the police! Denounce me, do your worst, but you will only take my lifeless body. May it be of service to you. This you intended should be a fine coup of vengeance. But I’ll cheat you yet! I’ll cheat you—I—” “Ring, and call in the police,” Armytage suggested.
  • 72. “Useless! useless!” the wretched man gasped, his face drawn and distorted as, clutching the back of the chair, he stood swaying forward slightly. “Can’t you see that all your carefully planned revenge is unavailing?” They regarded him in blank astonishment. Even as they looked his face changed, and he was seized by convulsions which shook him from head to foot. “Can’t you see?” he cried wildly. “I’ve cheated you, and I’m dying. On my finger is the death-ring—the pretty finger ornament which, when pressed, punctures the skin beneath and injects a poison which is swift, and to which there is no known antidote.” “Heavens!” cried the Captain, glancing at the ring the assassin had assumed. “Now that I remember, Vittorina wore a ring exactly similar to that! Upon her hand after death was a strange discoloration which puzzled the doctors. Then she was murdered by a simple pressure of the hand, which inflicted a puncture beneath the ring, and the latter, being irremovable on account of the post-mortem swelling, the cause of death remained concealed. Truly the means by which she was killed were as cunning and swift as the manner in which the crime was accomplished.” The haggard, white-faced culprit stood swaying forward, holding the chair, his black eyes starting from his head, his parched tongue protruding, his lips drawn, his whole appearance horrible. In those moments of intense agony a jumble of half-incoherent words, like the gibbering of an idiot, escaped him; yet from them it seemed as though he were living his whole evil life again, and that scenes long since past flashed before him, only to be succeeded by this final one—more tragic, more terrible, more agonising than them all.
  • 73. “I told you that the police should never take me!” he gasped with extreme difficulty. “Montelupo’s bloodhounds have already scented me to-day, but I’ve tricked them as I’ve tricked you. I’m not afraid of death. I’m no coward. See!” And again he grasped the ring, and, grinding his teeth, pressed the tiny steel point therein concealed deep into the flesh. Then he gave vent to a loud, harsh laugh, meant to be derisive, but sounding horrible in combination with the death-rattle in his throat. His life was fast ebbing. Great beads of perspiration rolled off his white brow. Again he tried to speak, but the single word “Vittorina,” hoarse and low, was the only one that passed his twitching lips. His bright, glassy eyes, still flashing a murderous hatred in the agony of death, were fixed immovably upon his accuser, when suddenly, almost without warning, he was seized with frightful convulsions, his jaws set, the light died from his face, his legs seemed to give way beneath him, and, reeling, he fell headlong to the floor, carrying the chair with him. Both men in an instant knelt eagerly beside him. Tristram quickly loosened his vest, and placed his hand upon his heart. It had already ceased its action. The subtle Eastern poison—for such it afterwards proved to be—had done its work swiftly, completely. Lionello Nenci— conspirator, murderer, and outlaw, one of the most desperate and dangerous characters that Italy has produced during the past decade, and the miscreant whose arrest had been stipulated by the Marquis Montelupo in his compact with Gemma—was dead.
  • 74. Le Funaro was free. The terrible thraldom which had compelled her to act as secret agent of the State was for ever ended.
  • 75. Chapter Thirty One. Fiori d’Arancio. Nearly a year had gone by. The strange suicide of an Italian at the Hotel Victoria had been regarded merely as a tragic incident by readers of newspapers, for no word of the motive which led Nenci to take his life had been allowed to leak out. To the public, the death of Vittorina still remains one of London’s many mysteries. In the few brief months that had elapsed, peace, calm and complete, had come to Gemma and to Charles Armytage; for one morning, in the dimly lit old Church of Santa Maria Novella, in Florence, and afterwards at the Office of the British Consul-General in the Via Tornabuoni, they had been made man and wife. Then, for nearly six months, they had travelled in Austria, Switzerland, and Germany, subsequently spending the winter in a furnished villa high up on the olive-clad hill behind Cimiez, where they were visited by Captain Tristram and Carmenilla, who, too, had married, and were spending their honeymoon on the Riviera. At last, when Carnival had come and gone, the season waned, and Nice and Cannes were emptying, they, too, left and returned to the great old Palazza Funaro in Florence. They had dined tête-à-tête one evening, had strolled arm in arm through these great silent chambers which seemed to speak mutely of the gorgeous pageantry in the days when the Medici had ruled Florence, and entered the room
  • 76. furnished in modern style—the same in which he had a year ago pledged his belief in her. After the man resplendent in the Funaro livery had brought their coffee, Gemma seated herself upon the settee beside her husband, and, taking up her mandolino, commenced to sing that sweet old Tuscan song he loved so well, which has for its chorus— “O bello mio adorabile Svenire in se mi par Vorrei fuggirti rapida, Non so come mi far!” When she had finished, she was silent, as if in hesitation; then, with her clear eyes fixed upon his, exclaimed, in very good English— “You have trusted me blindly, completely, Nino. You married me in face of all the vile libels which spread from mouth to mouth; yet only to-night am I free to tell you the truth. My story is a strange—a very strange one. Would you like to hear it?” “Of course, dearest,” he cried eagerly. “You know for months I have longed to know the truth.” “Then you shall know. I will tell you everything,” she answered. “When I returned here fresh from the convent- school, with unformed girlish ideas, I fancied that the King had slighted my family, one of the oldest in Tuscany, and, finding myself possessor of this place and my father’s fortune, became imbued with a deep, implacable hatred of the monarchy. I lived here with a maiden aunt, took sides with the Republicans, and was induced to secretly join a league of desperate malefactors who had in view the establishment of the long-dreamed-of republic in Italy. In
  • 77. my youthful ignorance, I knew nothing of the means by which they intended to accomplish their object, for their action seemed confined in daubing in black paint upon the walls and pavements of the principal cities such as ‘Down with the royal robbers! Long live the Republic!’ In every town where elections took place the ominous writing on the wall appeared, but the authorities were never able to detect its mysterious authors. With old Lady Marshfield, whose eccentric support of all sorts of wild schemes is well known, and who lived in Florence at that time, I joined this secret league at a meeting held in a house on the Passeggio in Livorno, only a few doors from where I lived when we spent so many sunny hours together. A month later, however, at a reception one night at the British Embassy at Rome, I found myself chatting with the Marquis Montelupo, His Majesty’s Minister for Foreign Affairs. Having obtained my sanction, he next day called upon me; but his attitude had changed, for he accused me of being one of the ringleaders of this mysterious gang, and declared that he would order my arrest if I did not consent to become a spy in the service of the Ministry. He saw, I suppose, that I was young, attractive, and could possibly obtain knowledge of certain secrets which would be of use to him. In vain I pleaded, even upon my knees, but he was obdurate. He intended, he said, to stamp anarchism out of Italy, and told me that to avoid imprisonment and disgrace I must furnish complete reports of the intentions and doings of my associates. At last—well, at last I was forced to consent.” “You became a spy?” “Yes,” she answered hoarsely. “I became a mean, despicable traitor, a wretched, soul-tortured woman, whose denunciations caused the arrest and imprisonment of the more dangerous members of the gang, while at the same time, moving in the diplomatic circle in Rome, I furnished
  • 78. constant reports to Montelupo of the feeling existing towards Italy. Friendless and helpless, I became that man’s catspaw. He held me for life or death. He spread reports about me, vile scandals which caused respectable people to shun me, but increased my popularity among the faster set in Rome and Florence, to whom I became known as the Contessa Funaro although I was unmarried. When I protested, he merely laughed in my face, saying that he had done so for political reasons, because it had got abroad that I was in the pay of the Ministry, and if I showed myself to be a gay, heartless woman, instead of a patrician diplomatist, this rumour might be refuted. “So, compelled to suffer this indignity in silence, and maintain the ignominious part he had allotted to me, I went to Livorno under the assumed name of Fanetti, and attended the constant meetings of the league which were taking place there. Was it any wonder that I should, under such circumstances, actually become an Anarchist? Among the members of this band of secret assassins—an offshoot of the dreaded Mafia—was a girl named Vittorina Rinaldo, who, having ascertained by some means that Nenci and Malvano, then in England, had misappropriated the greater part of the funds of the league, resolved to travel to London and denounce them. This she did, being accompanied thither by Captain Tristram, who had been induced to join us by Lady Marshfield, and, I suppose, with some vague hope that the knowledge thus acquired might be of service to the British Foreign Office. Vittorina and myself had taken the oath at the same meeting of the league, and had on that night received from Nenci, the leader, rings of exactly similar pattern—‘marriage rings,’ he laughingly termed them. Well, you are aware of that scoundrel’s devilish ingenuity. It was he who had made those rings so that by a mere pressure of his hand upon the ring the poison was injected, and the girl’s life taken. You know how cleverly
  • 79. circumstantial evidence was fastened upon her friend. From recent inquiries, I have discovered that Vittorina’s relations on her mother’s side were English, and had a villa up at Como, and that Major Maitland, having a couple of years before appropriated a large sum of money belonging to her, was no doubt an accessory to her death, for he has never been heard of since the night of the crime. Remember that his photograph was found among her possessions, and that he was no doubt with Nenci awaiting her arrival that night at Charing Cross.” “There seems to be little doubt, from the fact that Nenci gave you a similar ring, that he intended you should share the same fate as Vittorina,” her husband observed, marvelling at her story. “Certainly he did,” she answered. “Time after time I strove to free myself, from the fetters ever galling me and driving me to desperation, but Montelupo was always inexorable. He loved Vittorina, I afterwards discovered, for it was he who had written that mysterious letter signed ‘Egisto,’ and he was determined to avenge her murderer. Like ourselves he was utterly unaware of the identity of the assassin. Now, however, that you have supplied the information wanting, and the culprit has paid the penalty; now that Malvano, the man who so cleverly acted as secret agent of the Embassy in London, while the same moment he was plotting against the State, and his cunning companion, Romanelli, have been arrested, tried at Rome, and will spend the remainder of their lives in imprisonment on Elba, my master has given me my freedom. I am free to love you, Nino.” “But the little marble image?” he said. “Why was that deadly thing so ingeniously contrived?”
  • 80. “In order to strike a blow which was intended should paralyse the monarchy and cause a revolution in Italy,” she answered quickly. “In the blue boudoir in the Quirinal, on a sideboard behind the Queen’s private writing-table, there stands a tiny but exactly similar bust. In collusion with one of the royal servants, it was proposed to exchange this image for one invented by Nenci and Malvano, so that when His Majesty joined the Queen one night after dinner, both would be blown into eternity.” “Then, by your efforts, and by the imminent risks you ran among that desperate gang, you averted the terrible catastrophe—you, indeed, saved Italy.” “I suppose I did,” she said. “At that time political feeling ran high, and such a blow at the monarchy would have undoubtedly given the Republicans and Anarchists the upper hand. But I do not now regret,” she added, a look of supreme happiness lighting up her beautiful countenance —“I do not regret, Nino, because I have secured your true honest love.” “I believe in your honesty, darling, for I know how terribly you have suffered,” he exclaimed, drawing her closer to him, until her head fell upon his shoulder. “Those who now seek to besmirch your good name shall answer to me.” Their hands clasped, their eyes exchanged a love-look long, deep, and intense. Then her eager lips met his in one fierce passionate kiss. “The years of my bondage are like some half-remembered hideous nightmare, Nino,” she murmured, still gazing full into his eyes. “But it is all finished, for you, my husband, true, patient, and forbearing placed in my hand a weapon against my enemies; you brought back to me a renewed
  • 81. desire for life and its pleasures; and you gave me deliverance from the evil that encompassed me. Truly a perfect peace is ours, for the dark Day of Temptation has waned, and has given place to a bright and blissful dawn.” The End. | Chapter 1 | | Chapter 2 | | Chapter 3 | | Chapter 4 | | Chapter 5 | | Chapter 6 | | Chapter 7 | | Chapter 8 | | Chapter 9 | | Chapter 10 | | Chapter 11 | | Chapter 12 | | Chapter 13 | | Chapter 14 | | Chapter 15 | | Chapter 16 | | Chapter 17 | | Chapter 18 | | Chapter 19 | | Chapter 20 | | Chapter 21 | | Chapter 22 | | Chapter 23 | | Chapter 24 | | Chapter 25 | | Chapter 26 | | Chapter 27 | | Chapter 28 | | Chapter 29 | | Chapter 30 | | Chapter 31 |
  • 82. *** END OF THE PROJECT GUTENBERG EBOOK THE DAY OF TEMPTATION *** Updated editions will replace the previous one—the old editions will be renamed. Creating the works from print editions not protected by U.S. copyright law means that no one owns a United States copyright in these works, so the Foundation (and you!) can copy and distribute it in the United States without permission and without paying copyright royalties. Special rules, set forth in the General Terms of Use part of this license, apply to copying and distributing Project Gutenberg™ electronic works to protect the PROJECT GUTENBERG™ concept and trademark. Project Gutenberg is a registered trademark, and may not be used if you charge for an eBook, except by following the terms of the trademark license, including paying royalties for use of the Project Gutenberg trademark. If you do not charge anything for copies of this eBook, complying with the trademark license is very easy. You may use this eBook for nearly any purpose such as creation of derivative works, reports, performances and research. Project Gutenberg eBooks may be modified and printed and given away—you may do practically ANYTHING in the United States with eBooks not protected by U.S. copyright law. Redistribution is subject to the trademark license, especially commercial redistribution. START: FULL LICENSE
  • 83. THE FULL PROJECT GUTENBERG LICENSE
  • 84. PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK To protect the Project Gutenberg™ mission of promoting the free distribution of electronic works, by using or distributing this work (or any other work associated in any way with the phrase “Project Gutenberg”), you agree to comply with all the terms of the Full Project Gutenberg™ License available with this file or online at www.gutenberg.org/license. Section 1. General Terms of Use and Redistributing Project Gutenberg™ electronic works 1.A. By reading or using any part of this Project Gutenberg™ electronic work, you indicate that you have read, understand, agree to and accept all the terms of this license and intellectual property (trademark/copyright) agreement. If you do not agree to abide by all the terms of this agreement, you must cease using and return or destroy all copies of Project Gutenberg™ electronic works in your possession. If you paid a fee for obtaining a copy of or access to a Project Gutenberg™ electronic work and you do not agree to be bound by the terms of this agreement, you may obtain a refund from the person or entity to whom you paid the fee as set forth in paragraph 1.E.8. 1.B. “Project Gutenberg” is a registered trademark. It may only be used on or associated in any way with an electronic work by people who agree to be bound by the terms of this agreement. There are a few things that you can do with most Project Gutenberg™ electronic works even without complying with the full terms of this agreement. See paragraph 1.C below. There are a lot of things you can do with Project Gutenberg™ electronic works if you follow the terms of this agreement and help preserve free future access to Project Gutenberg™ electronic works. See paragraph 1.E below.
  • 85. 1.C. The Project Gutenberg Literary Archive Foundation (“the Foundation” or PGLAF), owns a compilation copyright in the collection of Project Gutenberg™ electronic works. Nearly all the individual works in the collection are in the public domain in the United States. If an individual work is unprotected by copyright law in the United States and you are located in the United States, we do not claim a right to prevent you from copying, distributing, performing, displaying or creating derivative works based on the work as long as all references to Project Gutenberg are removed. Of course, we hope that you will support the Project Gutenberg™ mission of promoting free access to electronic works by freely sharing Project Gutenberg™ works in compliance with the terms of this agreement for keeping the Project Gutenberg™ name associated with the work. You can easily comply with the terms of this agreement by keeping this work in the same format with its attached full Project Gutenberg™ License when you share it without charge with others. 1.D. The copyright laws of the place where you are located also govern what you can do with this work. Copyright laws in most countries are in a constant state of change. If you are outside the United States, check the laws of your country in addition to the terms of this agreement before downloading, copying, displaying, performing, distributing or creating derivative works based on this work or any other Project Gutenberg™ work. The Foundation makes no representations concerning the copyright status of any work in any country other than the United States. 1.E. Unless you have removed all references to Project Gutenberg: 1.E.1. The following sentence, with active links to, or other immediate access to, the full Project Gutenberg™ License must appear prominently whenever any copy of a Project Gutenberg™ work (any work on which the phrase “Project Gutenberg” appears, or with which the phrase “Project Gutenberg” is associated) is accessed, displayed, performed, viewed, copied or distributed:
  • 86. This eBook is for the use of anyone anywhere in the United States and most other parts of the world at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this eBook or online at www.gutenberg.org. If you are not located in the United States, you will have to check the laws of the country where you are located before using this eBook. 1.E.2. If an individual Project Gutenberg™ electronic work is derived from texts not protected by U.S. copyright law (does not contain a notice indicating that it is posted with permission of the copyright holder), the work can be copied and distributed to anyone in the United States without paying any fees or charges. If you are redistributing or providing access to a work with the phrase “Project Gutenberg” associated with or appearing on the work, you must comply either with the requirements of paragraphs 1.E.1 through 1.E.7 or obtain permission for the use of the work and the Project Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9. 1.E.3. If an individual Project Gutenberg™ electronic work is posted with the permission of the copyright holder, your use and distribution must comply with both paragraphs 1.E.1 through 1.E.7 and any additional terms imposed by the copyright holder. Additional terms will be linked to the Project Gutenberg™ License for all works posted with the permission of the copyright holder found at the beginning of this work. 1.E.4. Do not unlink or detach or remove the full Project Gutenberg™ License terms from this work, or any files containing a part of this work or any other work associated with Project Gutenberg™. 1.E.5. Do not copy, display, perform, distribute or redistribute this electronic work, or any part of this electronic work, without prominently displaying the sentence set forth in paragraph 1.E.1
  • 87. Welcome to our website – the perfect destination for book lovers and knowledge seekers. We believe that every book holds a new world, offering opportunities for learning, discovery, and personal growth. That’s why we are dedicated to bringing you a diverse collection of books, ranging from classic literature and specialized publications to self-development guides and children's books. More than just a book-buying platform, we strive to be a bridge connecting you with timeless cultural and intellectual values. With an elegant, user-friendly interface and a smart search system, you can quickly find the books that best suit your interests. Additionally, our special promotions and home delivery services help you save time and fully enjoy the joy of reading. Join us on a journey of knowledge exploration, passion nurturing, and personal growth every day! ebookbell.com