Tải bản đầy đủ (.pdf) (364 trang)

Building web services with java making sense of xml, soap, wsdl, and uddi (second edition) part 1

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (6.21 MB, 364 trang )


Building Web
Services with Java
M A K I N G S E N S E O F X M L ,
W S D L , A N D U D D I

S O A P,

Second Edition

Steve Graham
Doug Davis
Simeon Simeonov
Glen Daniels
Peter Brittenham
Yuichi Nakamura
Paul Fremantle
Dieter König
Claudia Zentner

DEVELOPER’S
LIBRARY

Sams Publishing, 800 East 96th Street, Indianapolis, Indiana 46240


Building Web Services with Java,
Second Edition

Associate Publisher
Michael Stephens



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 omissions. 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

Acquisitions Editor
Todd Green

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 information 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

For sales outside of the U.S., please contact
International Sales
1-317-428-3341


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 ServiceOriented 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


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 and Validity 51
XML Schema Basics 52
Associating Schemas with Documents 54
Simple Types 55
Complex types 59
The Purchase Order Schema 62
Global Versus 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

v


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 Provider View 117
Deploying the Service 118
The Client View 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


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

vii


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


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 for Your 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 TypeMapping 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

ix


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 UDDI Version 3.0 335
Using WSDL with UDDI 337


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
J2EE Versions 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

xi


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 of Value 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


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

xiii


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


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


xv


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


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-Down Versus 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

xvii


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
Index

731

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 computing 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 technologies 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 project,TeamConnection, and IBM’s FORTRAN 90 compiler. Doug has a bachelor of science degree from the University of California at Davis and a master’s degree in computer science from Michigan State University.
Simeon Simeonov is a Principal at Polaris Venture Partners in Boston, where he helps
early-stage IT companies accelerate their growth. Prior to joining Polaris, Sim was Vice
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 categorydefining 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 mathematics 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 participates 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 initiatives and helped to bring the company into the Web services era.When not at standards 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 architect for the IBM Web Services Toolkit, which provided a preview of emerging Web service 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 computer 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 objectoriented systems, multi-agent systems, B2B e-commerce, and knowledge engineering.
Since 1999 he has been working on Web services, addressing security, caching, and performance.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 services 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 offering. 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 services 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 support and patience. My thanks to my colleagues at IBM for providing this great environment 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 children 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 making 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:
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.


Introduction

W

ELCOME 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 understand 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 related 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 demonstrate these approaches.We also review in detail the Apache Axis Web services infrastructure 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.



×