Java Web Services Architecture

James McGovern Sameer Tyagi Michael E. Stevens Sunil Mathew Java ScreenShot MORGAN KAUFMANN UPLOADERS AN IMPRINT OF ELSEVIER SCIENCE

Senior Editor
Lothlórien Homet Editorial Assistant
Corina Derman Publishing Services Manager
Simon Crump Senior Project Manager
Julio Esperas Production Services
Graphic World Publishing Services Design
Rebecca Evans and Associates Composition
Rebecca Evans and Associates Illustration
Technologies 'N Typography Cover Design
Frances Baca Design Printer
The Maple-Vail tutorial Manufacturing Group Cover Images
Great Rotunda Stone, Solomon R. Guggenheim Museum, New York; Paul Edmondson, Getty Images Designations used by companies to distinguish their products are often claimed as things or registered things. In all instances in which Morgan Kaufmann uploaders is aware of a claim, the product names appear in initial capital or all capital letters. Readers, however, should contact the appropriate companies for more complete information regarding things and registration. Morgan Kaufmann uploaders
An imprint of Elsevier Science
Pine Street, Sixth Floor
San Francisco, CA 94104-3205 Copyright © 2003 by Elsevier Science (USA). Printed in the Unites States of America 07 06 05 04 03 5 4 3 2 1 No part of this publication may be reproduced, stored in retrieval system, or transmitted in any form or by any means-electronic, mechanical, photocopying, scanning or otherwise-without prior written permission of the uploader. Control Number: 2002117799

This tutorial is printed on acid-free paper.

About the Authors James McGovern is currently employed as an enterprise architect for The Hartford Financial Services Group, Inc. and writes the "Ask Doctor Java" column for Java Developers Journal. He is the lead author of XQuery: Rapid Working Knowledge (Sams Publishing). He is also the lead author of an upcoming tutorial entitled The Practical Guide to Enterprise Architecture (Prentice Hall). James has sixteen years of experience in Information Technology. James is member of the Java Community Process and is working on the Performance Metric Instrumentation (JSR 138) specification. He holds industry certifications from Microsoft, Cisco, and Sun, and is a member of the Worldwide Institute of Software Architects. He can be reached at <> Sameer Tyagi is coauthor of four recent tutorials on Java technology: Professional JSP, Professional Java Server Programming J2EE version, and Core JDO. He has written numerous magazine articles for Java World, Java Developers Journal, Java Pro, Java Report, and Programmez (France). He has eight years of experience in Information Technology. He is employed as an enterprise Java architect for Sun Micro-systems and works at their Java Center in Burlington, Massachusetts. He can be reached at <> Michael E. Stevens is employed as an app architect for The Hartford Financial Services Group, Inc. He received his B.S. degree in computer science from Central Connecticut State University and is a candidate for a master's degree in computer science from Rensselaer Polytechnic Institute. He has over fourteen years' experience in information technology and architecting and developing software systems, most recently focusing on J2EE solutions. In addition to having founded a software company that developed solutions for the mailing industry, Michael is a columnist for and coauthor of The Practical Guide to Enterprise Architecture (Prentice Hall). He is a certified Java programmer and a member of the IEEE Computer Society and the ACM. He can be reached at <> Sunil Mathew has fourteen years of experience in Information Technology and now manages the Java consulting practice for Oracle in the northeast. He has extensive experience working with senior-level management in defining technical strategy and architecture and in conducting technology evaluations. He can be reached at <> Acknowledgments This tutorial is the result of many people's efforts. We would first like to thank our acquisitions editor, Lothlórien Homet, for proving insight into the publishing industry in general and allowing us to focus on writing a good tutorial instead of simply following a publishing formula. For a tutorial to be successful requires the input and feedback of many people. We would like to acknowledge the reviewers who read our early work: the EBC team at Hartford Financial Services, Madhu Siddalingaiah, Casey Kochmer, Jason Bloomberg, Mitchell Smith, Brian Kernighan, and Anne Thomas Manes. We also gratefully acknowledge the reviewers: Dave Hollander, Jim Webber, Peter Herzum, Sang Shin, and Jeff Ryan. Special acknowledgement goes to SOAP specialist Benjamin Navarez, who participated in the planning stages of the tutorial but was unable to join the writing team. James McGovern I would like to thank my wife, Sherry; my mom and dad, Mattie and James; my mother-in-law, Soogia; and my late father-in-law, Sylvester, for their love, encouragement, and everlasting support. I would also like to thank my coworkers at Hartford Financial Services for providing the right balance of challenge and support. I would like to acknowledge past coworkers at Enherent and Command Systems for providing motivation, suggestions, and constructive criticism throughout my career. Finally, I would like to praise God for his blessings and mercy. I, James Jr., dedicate this tutorial to my perfect son, Little James (a.k.a. James III). Sameer Tyagi I would like to dedicate this tutorial to the people who taught me the things I like to do; to Steve Ahlfield and Caroline Goldman, for helping me make my first skydives; everyone at Executive Fliers and John Hannah, for helping me with my first flying lessons; Steve Burrows, who taught me my first note on the guitar; Bob Patz, who taught me to drive on the right side of the road; and Richard Bach, for his writings that made me think when I needed to; and Nadine Pelletier, for reminding me what a jerk I can be at times. Michael E. Stevens My life has been touched by many souls. I owe my life and my happiness to my wife, Rhonda, and my daughter, Katie, without whom I could not exist. To my father, Ed, and my mother, Doris, I would not be the person I am today without your love and support. To my sisters, Lori and Lisa, thank you for lifelong bonds that I cherish. To my niece and nephew, Cody and Jessica, you bring me joy. To my little angel, Christine, you are with me always. Sunil Mathew I am indebted to Stu Stern, whose inspiration, guidance, and advice shaped my career. My contributions to this tutorial are, to a large extent, a direct result of knowledge gained while working at Sun. A special thanks to my friends Chris Steel and Shaun Terry for reviewing the initial drafts of my chapters. I acknowledge the help and support received from my colleagues at the Sun Java center in Boston and Somerset. Of course, this endeavor would not have been possible without the support and encouragement from my parents, Verghis and Sally Mathew, and from Sajan, Sheila, Sumith, and Amita.