Cross platform web services using c sharp and java 2003

499 197 0
Cross platform web services using c sharp and java 2003

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Cross-Platform Web Services Using C# and Java ISBN:1584502622 by Brian Hochgurtel Charles River Media © 2003 (386 pages) This comprehensive text provides an introduction to Web services under C# and Java, along with the underlying standards that drive them It shows how the different technologies work and collaborate, then describes security and examines practical examples CD Content Table of Contents CROSS-PLATFORM WEB SERVICES USING C# AND JAVA Preface Section I - Introduction to Web Service Technologies Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 - Introduction to Web Services - Brief Introduction to XML - SOAP - WSDL - UDDI Section II - Web Service Implementations Chapter 6 Chapter 7 Chapter 8 - NET Web Services with C# - Web Services with Apache SOAP - Web Services with Apache Axis Section III - Web Service Implementations Chapter 9 Chapter 10 Chapter 11 Chapter 12 - Java and NET Web Service Integration - Web Service Security - Practical Application of Web Services - Using Web Services as a Middle Tier Creating Your Own Web Services Chapter 13 Implementation Appendix A - About the CD-ROM Appendix B - Software Used in This Book Appendix C - Apache License Appendix D - Visual Basic.NET Appendix E - Using PERL to Access Web Services Appendix F - Microsoft’s UDDI NET SDK Index List of Figures List of Tables CD Content Back Cover As the need for application-to-application communication and platform interoperability continues to grow, Web Service developers need to be skilled in the technologies and languages that make this communication possible Web Services provide a language and platform independent standard for creating and connecting code that allows software applications (remote objects) to communicate with each other and users, via a network or the Web Rather than focus on one specific technology or language, Cross-Platform Web Services Using C# & Java explains how to integrate the various technologies of Web Services using the two languages expected to dominate this growing area KEY FEATURES Focuses on the cross-platform interoperability of Web Services Teaches all of the technologies and underlying standards of Web Services, including XML, WSDL, and UDDI Covers development of NET and Java Web Services Shows how to integrate applications developed with other languages and legacy systems Provides a separate chapter on cross-platform implementation of Web Service security, including firewalls, SSL, ID, XML signatures, and testing Covers latest Web Services tools of the Apache group, including SOAP, Axis, and Tomcat About the Author Brian Hochgurtel, Erie, CO, is an independent software development engineer and Web development consultant He is the co-author of Visual Basic NET and XML and has written several articles on XML CROSS-PLATFORM WEB SERVICES USING C# AND JAVA Brian Hochgurtel CHARLES RIVER MEDIA, INC 10 Downer Avenue Hingham, Massachusetts 02043 Copyright 2003 by CHARLES RIVER MEDIA, INC All rights reserved No part of this publication may be reproduced in any way, stored in a retrieval system of any type, or transmitted by any means or media, electronic or mechanical, including, but not limited to, photocopy, recording, or scanning, without prior permission in writing from the publisher Acquisitions Editor: Jim Walsh Production: Publishers’ Design and Production Services, Inc Cover Design: The Printed Image 781-740-0400 781-740-8816 (FAX) info@charlesriver.com www.charlesriver.com This book is printed on acid-free paper Brain Hochgurtel Cross-Platform Web Services Using C# and Java ISBN: 1-58450-262-2 All brand names and product names mentioned in this book are trademarks or service marks of their respective companies Any omission or misuse (of any kind) of service marks or trademarks should not be regarded as intent to infringe on the property of others The publisher recognizes and respects all marks used by companies, manufacturers, and developers as a means to distinguish their products Library of Congress Cataloging-in-Publication Data Hochgurtel, Brian Cross-platform Web services using C# and Java / Brian Hochgurtel p cm ISBN 1-58450-262-2 Web site development Internet programming C (Computer program language) Java (Computer program language) Crossplatform software development I Title TK5105.888.H617 2003 005.2'76—dc21 2002154754 Printed in the United States of America 03 7 6 5 4 3 2 First Edition CHARLES RIVER MEDIA titles are available for site license or bulk purchase by institutions, user groups, corporations, etc For additional information, please contact the Special Sales Department at 781-7400400 Requests for replacement of a defective CD-ROM must be accompanied by the original disc, your mailing address, telephone number, date of purchase and purchase price Please state the nature of the problem, and send the information to CHARLES RIVER MEDIA, INC., 10 Downer Avenue, Hingham, Massachusetts 02043 CRM’s sole obligation to the purchaser is to replace the disc, based on defective materials or faulty workmanship, but not on the operation or functionality of the product First of all, I need to thank my wife for putting up with me hiding in my office for six months while I wrote this book Her patience and support were astounding I also need to thank my friend, Rod Stephens, for taking me under his wing during the book we wrote together in 2001 Without him I doubt I could have written or even proposed this book Acknowledgments First of all, I need to thank my wife for putting up with me hiding in my office for six months while I wrote this book Her patience and support were astounding I also need to thank my friend, Rod Stephens, for taking me under his wing during the book we wrote together in 2001 Without him I doubt I could have written or even proposed this book THE CD-ROM WHICH ACCOMPANIES THE BOOK MAY BE USED ON A SINGLE PC ONLY THE LICENSE DOES NOT PERMIT THE USE ON A NETWORK (OF ANY KIND) YOU FURTHER AGREE THAT THIS LICENSE GRANTS PERMISSION TO USE THE PRODUCTS CONTAINED HEREIN, BUT DOES NOT GIVE YOU RIGHT OF OWNERSHIP TO ANY OF THE CONTENT OR PRODUCT CONTAINED ON THIS CD-ROM USE OF THIRD PARTY SOFTWARE CONTAINED ON THIS CD-ROM IS LIMITED TO AND SUBJECT TO LICENSING TERMS FOR THE RESPECTIVE PRODUCTS CHARLES RIVER MEDIA, INC (“CRM”) AND/OR ANYONE WHO HAS BEEN INVOLVED IN THE WRITING, CREATION, OR PRODUCTION OF THE ACCOMPANYING CODE (“THE SOFTWARE”) OR THE THIRD PARTY PRODUCTS CONTAINED ON THE CD-ROM OR TEXTUAL MATERIAL IN THE BOOK, CANNOT AND DO NOT WARRANT THE PERFORMANCE OR RESULTS THAT MAY BE OBTAINED BY USING THE SOFTWARE OR CONTENTS OF THE BOOK THE AUTHOR AND PUBLISHER HAVE USED THEIR BEST EFFORTS TO ENSURE THE ACCURACY AND FUNCTIONALITY OF THE TEXTUAL MATERIAL AND PROGRAMS CONTAINED HEREIN; WE, HOWEVER, MAKE NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, REGARDING THE PERFORMANCE OF THESE PROGRAMS OR CONTENTS THE SOFTWARE IS SOLD “AS IS” WITHOUT WARRANTY (EXCEPT FOR DEFECTIVE MATERIALS USED IN MANUFACTURING THE DISC OR DUE TO FAULTY WORKMANSHIP) THE AUTHOR, THE PUBLISHER, DEVELOPERS OF THIRD PARTY SOFTWARE, AND ANYONE INVOLVED IN THE PRODUCTION AND MANUFACTURING OF THIS WORK SHALL NOT BE LIABLE FOR DAMAGES OF ANY KIND ARISING OUT OF THE USE OF (OR THE INABILITY TO USE) THE PROGRAMS, SOURCE CODE, OR TEXTUAL MATERIAL CONTAINED IN THIS PUBLICATION THIS INCLUDES, BUT IS NOT LIMITED TO, LOSS OF REVENUE OR PROFIT, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THE PRODUCT THE SOLE REMEDY IN THE EVENT OF A CLAIM OF ANY KIND IS EXPRESSLY LIMITED TO REPLACEMENT OF THE BOOK AND/OR CD-ROM, AND ONLY AT THE DISCRETION OF CRM THE USE OF “IMPLIED WARRANTY” AND CERTAIN “EXCLUSIONS” VARY FROM STATE TO STATE, AND MAY NOT APPLY TO THE PURCHASER OF THIS PRODUCT Preface The goal of this book is to provide you with an introduction to Web Services under C# and Java, along with the underlying standards that drive them This book shows how the different technologies work and collaborate, and then describes security and examines more practical examples Structure of the Book In the first section, the book examines the underlying XML standards and the concepts of remote objects Many times the XML that works underneath Web Services can be ignored because the software operates at such a high level But when you run into glitches or you just happen to look at a request and response within a viewer, it’s useful to know what the XML represents and the function it serves In the second section, Java and C# technologies that deploy Web Services are examined and several examples are given This involves not only creating the service but also creating software and Web pages that act as a consumer In the third section, the details of deploying Web Services are examined This includes using tools to make Web Services from C# communicate with Java and visa versa This section also looks closely at gathering and implementing the security requirements necessary to protect Web Services Most of the Web Service examples in the book are quick and to the point, but the third section the book takes a closer look at the deployment and testing of a more complex Web Service This allows you to examine how the Web Service works with the various consumers and how to pass more complex values Chapter 10: Web Service Security Figure 10.1: A firewall and proxy server working together to protect and monitor the network inside a corporation Figure 10.2: Using a subnet to control access to a Web Services implementation Figure 10.3: The security tab in Internet Information Server Figure 10.4: The “Authentication Methods” dialogue box Figure 10.5: The Windows authentication dialogue box Figure 10.6: The “Security” tab with “Basic Authentication” chosen Figure 10.7: Selecting a domain name for users that utilize Basic Authentication to access the Web Services Figure 10.8: The “Basic Authentication” dialogue box in Internet Explorer Figure 10.9: Visual Studio.NET asks for your username and password to access the WSDL of a secured Web Service Figure 10.10: The “Management Console” on Windows 2000 Pro when it first loads Figure 10.11: The "Add/Remove Snap In" window Figure 10.12: The window in the management console where you select certificates to manage Figure 10.13: The console window with certificates selected for the current user Figure 10.14: The console window shows the installed certificates for the author’s machine Figure 10.15: A NET Web Services implementation proxying requests to a Java Web Services implementation behind the firewall Figure 10.16: IIS and Apache Web servers sitting in the DMZ proxying requests to one another depending on the consumer who makes the request Chapter 11: Practical Application of Web Services Figure 11.1: The JSP consumer with the drop-down list Figure 11.2: The ASP.NET client form Figure 11.3: Using WebServicesStudio to test one of the Money Exchange methods Chapter 12: Using Web Services as a Middle Tier Figure 12.1: A middle tier utilizing Web Services can act as a clearinghouse to various data sources Figure 12.2: Creating a C# class library in Visual Studio.NET Figure 12.3: The “Build” settings for the XML parsing code Figure 12.4: Proxy requests to another Web Service doubles the amount of traffic being generated Figure 12.5: Putting the unit of work within a single method reduces the amount of traffic Figure 12.6: Login.aspx in Internet Explorer Figure 12.7: Default.aspx in Internet Explorer Chapter 13: Creating Your Own Web Services Implementation Figure 13.1: Making the HTTP request is the first step in creating a Web Service implementation Figure 13.2: The HTTP request to the server must include the appropriate XML from the SOAP standard Figure 13.3: Reading the response is the next part of designing your Web Services software Figure 13.4: How implementing Web Services software as a server implementation opens access to other platforms Figure 13.5: The HTML form that communicates with the MoneyExchange Axis Web Service Figure 13.6: The HTML form that communicates with the.NET Web Service Appendix D: Visual Basic.NET Figure D.1: The “New Project” dialogue in Visual Studio.NET with selections made for Visual Basic.NET Appendix F: Microsoft’s UDDI NET SDK Figure F.1: Adding a reference to a project within Visual Studio.NET Figure F.2: How the GUI for the UDDI SDK example in this appendix may appear List of Tables Chapter 3: SOAP Table 3.1: Provides a Quick Summary of All the Connection-Related Terms Table 3.2: A Summary of All the Terms Related to the SOAP message Table 3.3: The Different Primitive Types Available from XML Schema in the SOAP Standard Chapter 4: WSDL Table 4.1: The Parent Elements That Make up an XML Document Table 4.2: Detailed Information about What Each Namespace Definition Does for the WSDL Document Chapter 5: UDDI Table 5.1: Current Implementations of UDDI Version 1 Table 5.2: Beta Implementations of UDDI Version 2 Chapter 6: NET Web Services with C# Table 6.1: Options for the WSDL Tool from Microsoft Table 6.2: A Summary of the Options Used for the C# Compiler to Build the Proxy Chapter 7: Web Services with Apache SOAP Table 7.1: The Three Options for the Scope Attribute in the Deployment Descriptor CD Content Following are select files from this book's Companion CD-ROM These files are copyright protected by the publisher, author, and/or other third parties Unauthorized use, reproduction, or distribution is strictly prohibited For more information about this content see 'About the CD-ROM' Click on the link(s) below to download the files to your computer: File Description Size Cross-Platform Web Services Using C# and 5,177,682 All CD Content Java Chapter 1: Introduction to Web Services 149,248 Chapter 2: Brief Introduction to XML 36,082 Chapter 3: SOAP 53,075 Chapter 4: WSDL 45,174 Chapter 5: UDDI 1,171,976 Chapter 6: NET Web Services with C# 1,315,095 Chapter 7: Web Services with Apache SOAP 315,959 Chapter 8: Web Services with Apache Axis 658,089 Chapter 9: Java and NET Web Service Integration 526,528 Chapter 10: Web Service Security 428,654 Chapter 11: Practical Application of Web Services 115,932 Chapter 12: Using Web Services as a Middle Tier 183,510 Chapter 13: Code Creating Your Own Web Services Implementation 88,122 3,736 Images 95,579 ... Chapter 11 Chapter 12 - Java and NET Web Service Integration - Web Service Security - Practical Application of Web Services - Using Web Services as a Middle Tier Creating Your Own Web Services Chapter 13...Chapter 6 Chapter 7 Chapter 8 - NET Web Services with C# - Web Services with Apache SOAP - Web Services with Apache Axis Section III - Web Service Implementations Chapter 9 Chapter 10 Chapter 11... and XML and has written several articles on XML CROSS- PLATFORM WEB SERVICES USING C# AND JAVA Brian Hochgurtel CHARLES RIVER MEDIA, INC 10 Downer Avenue Hingham, Massachusetts 02043 Copyright 2003 by CHARLES RIVER MEDIA, INC

Ngày đăng: 25/03/2019, 17:10

Mục lục

  • Table of Contents

  • BackCover

  • Cross-Platform Web Services Using C# and Java

  • Preface

    • How to Use This Book

    • What You Need

    • Assumed Knowledge

    • Section I: Introduction to Web Service Technologies

      • Chapter 1: Introduction to Web Services

        • Defining Objects and Web Services

        • Where Web Services and SOAP Fit In

        • Underlying Web Service Technologies

        • Describing a Particular Web Service

        • Different Web Service Implementations

        • Other Technologies

        • Conclusion

        • Chapter 2: Brief Introduction to XML

          • Building an XML Document

          • Well-Formed and Valid XML

          • Self-Describing XML

          • Conclusion

          • Chapter 3: SOAP

            • Putting the Vocabulary into Action

            • The SOAP XML Document

            • SOAP Documents and Transport Bindings

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan