Microsoft® .NET and J2EE Interoperability Toolkit

Book description

Bridge the gap between the Microsoft .NET Framework and Java 2 Enterprise Edition (J2EE) by implementing the best interoperability solutions available today—and by learning to build compatible solutions and workarounds of your own.

Table of contents

  1. Microsoft® .Net and J2EE Interoperability Toolkit
  2. A Note Regarding Supplemental Files
  3. Acknowledgments
  4. Introduction
    1. Defining Interoperability
      1. Interoperability vs. Migration
      2. Interoperability vs. Portability
      3. The Benefits of Interoperability
      4. The History of Interoperability
    2. Who Should Read This Book
    3. The Structure of the Book
    4. Goals and Objectives of the Book
    5. Feedback
    6. Microsoft Press Support Information
  5. I. Getting Started
    1. 1. Microsoft .NET and J2EE Fundamentals
      1. Microsoft .NET Fundamentals for Java/J2EE Developers
        1. Building a .NET Application
          1. Locating and Sharing Other Assemblies
          2. Attributes
          3. Creating Applications for the Web
          4. Hosting Components
          5. Where’s the Application Server?
        2. References and Resources
          1. Microsoft .NET Product Page
          2. GotDotNet Community
          3. ASP.NET Community
          4. Windows Forms Community
      2. Java and J2EE Fundamentals for Microsoft .NET Developers
        1. Building a Java Application
          1. Locating and Sharing Other Classes
          2. Other Environment Variables
          3. Java IDEs
          4. Creating Applications for the Web
          5. Hosting Components
          6. Building and Deploying to a J2EE Application Server
        2. References and Resources
          1. Sun Java Product Page
          2. ServerSide.com Community
          3. JSP and Struts
          4. AWT and SWING
      3. Microsoft.NET and J2EE Technology Map
      4. Running the Sample Code in This Book
        1. Operating Systems
        2. .NET Environment
          1. Installing ASP.NET on Windows Server 2003
          2. Installing ASP.NET on Windows XP Professional
          3. Configuring ASP.NET Security
        3. Java/J2EE Environment
        4. Microsoft Products
          1. Microsoft SQL Server 2000
            1. Downloading an evaluation
          2. Microsoft SQL Server 2000 Driver for JDBC
            1. Downloading
          3. Microsoft Host Integration Server 2000
            1. Downloading an evaluation
          4. Microsoft BizTalk Server 2004 Beta 1
            1. Downloading the beta
          5. Microsoft Web Services Enhancements 1.0
            1. Downloading
        5. Third-Party Products
          1. TME GLUE 4.0.1 and Electric XML
            1. Licensing
          2. Intrinsyc Ja.NET 1.4
            1. Licensing
          3. IBM WebSphere MQ
            1. Downloading an evaluation
        6. Installing the Sample Code
        7. Building and Running the Sample Code
          1. Building the Source with Ant and NAnt
          2. Common Script Functions
          3. Configuration Directory
          4. Running the Code on Multiple Machines
          5. Setting Environment Variables
          6. Running the Setup Validation Tool
      5. Summary
    2. 2. Business Requirements for Interoperability
      1. Technology-Aligned Development
      2. Three Common Requirements
        1. Interoperability at the Presentation Tier
        2. Reuse of Business Tier Components
          1. Security Issues
          2. Transactional Issues
          3. Performance Issues
        3. Business Tier Resource Sharing
      3. Interoperability Concepts
        1. Point-to-Point Interoperability
        2. Resource Tier Interoperability
      4. Summary
    3. 3. Exchanging Data Between .NET and Java
      1. Data Exchange Challenges
        1. Our Sample Scenario
        2. What Is Serialization?
      2. Using Binary Serialization
        1. Running the Sample Code
        2. How the Sample Code Works
        3. Breaking the Sample Code
        4. Can Binary Serialization Ever Be Used for Interoperability?
      3. Using XML Serialization
        1. XML Parsing
          1. Running the Sample Code
            1. The .NET sample code
            2. The Java sample code
          2. More Efficient Parsing
          3. Limitations of Parsing XML
        2. XML Serialization for the .NET Platform
          1. Serializing an Object to XML
          2. Deserializing an Object from XML
        3. XML Serialization for the Java Platform
          1. Serializing an Object to XML
          2. Deserializing an Object from XML
          3. What About JAXB?
        4. Using XML Serialization and Ensuring Type Compatibility
          1. Introducing XML Schema
          2. What Is an XSD?
          3. Creating an XSD
          4. Generating Types from an XSD
            1. Generating a class in .NET from the XSD
            2. Generating a class in Java from the XSD
          5. Using the Generated Classes with XML Serialization
            1. Running the sample code
            2. The .NET sample code
            3. The Java sample code
          6. Starting with a Class
            1. Generating an XSD from an existing class in Java
            2. Generating an XSD from an existing class in .NET
          7. XSD in the Real World
          8. XSD Type Mapping
      4. Introducing the Interoperability Performance Tests
        1. How Do the Tests Work?
        2. How Do You Ensure Accuracy of the Tests?
        3. Why Not Use System.DateTime and System.TimeSpan?
        4. Why Are All the Performance Tests in .NET and Not Java?
        5. Interoperability Performance Test—XML Parsing
        6. Interoperability Performance Test—XML Serialization
      5. Data Exchange Recommendations
      6. Summary
  6. II. Interoperability Technologies: Point to Point
    1. 4. Connectivity with .NET Remoting
      1. Advantages of Using .NET Remoting
      2. Comparing .NET Remoting to XML Web Services
      3. Developing an Application That Uses .NET Remoting
      4. .NET Remoting Samples
        1. Introducing Intrinsyc’s Ja.NET
          1. Ja.NET Tools
          2. Ja.NET Installation
        2. The Sample Code
        3. Java Client to .NET Remoted Object
          1. The .NET Server Sample Code
          2. The Java Client Sample Code
        4. .NET Client to Java Object Hosted by Ja.NET TCP Server
          1. The Java Server Sample Code
          2. The .NET Client Sample Code
      5. Building Production Code
        1. Java Client to .NET Remoted Object, Hosted by IIS
          1. The .NET Server Sample Code
          2. The Java Client Sample Code
          3. Analyzing the Samples with the SOAP Trace Utility
        2. .NET Client to EJB, Hosted by J2EE Application Server
          1. The Java EJB Sample Code
          2. The .NET Client Sample Code
        3. Java Client to .NET Object, Hosted by Component Services
          1. The .NET Serviced Component Sample Code
          2. The Java Client Sample Code
        4. Interoperability Performance Tests
        5. Type Mappings
        6. Events and Exceptions
          1. Events
          2. Exception Handling
      6. Additional Java Support for .NET Remoting
      7. .NET Remoting and CORBA Interoperability
      8. Summary
    2. 5. Connectivity with XML Web Services, Part 1
      1. What Is an XML Web Service?
        1. The Web Services Landscape
        2. Web Services and the J2EE Specification
        3. The Web Services Interoperability Organization (WS-I)
          1. Deliverables
          2. Basic Profile 1.0
          3. Do We Need Another .org?
          4. Joining the WS-I
        4. Web Services Toolkit Selection
          1. Configuring GLUE
      2. Creating Web Services
        1. Creating a Web Service in .NET
          1. Option 1: Creating the Web Service Using Visual Studio .NET
          2. Option 2: Creating the Web Service Using the NAnt Script
          3. Testing the .NET Web Service
          4. Consuming the .NET Web Service Using a .NET Client
          5. Option 1: Creating the .NET Client Using Visual Studio .NET
          6. Option 2: Creating the .NET Client Using the NAnt Script
          7. Consuming the .NET Web Service Using a Java Client
        2. Creating a Web Service in Java
          1. Consuming the Java Web Service Using a Java Client
          2. Consuming the Java Web Service Using a .NET Client
      3. Summary
    3. 6. Connectivity with XML Web Services, Part 2
      1. Exposing EJBs by Using Web Services
        1. Publishing the Sample EJBs
        2. Testing the Deployment
        3. Consuming the Exposed EJB by Using a .NET Client
        4. Consuming the Exposed EJB by Using a Java Client
        5. Interoperability Advantages of Consuming EJBs via Web Services
      2. Exposing Serviced Components by Using Web Services
        1. Can’t You Just Use SOAP Activation?
        2. Publishing the Serviced Components
        3. How Does the Web Service Wrapper Work?
        4. Consuming the Exposed Component
      3. Web Services Authentication and Authorization
        1. Enabling Authentication and Authorization for the .NET Web Service
        2. Rebuilding the Clients
        3. Testing Unauthorized Clients
        4. Enabling Authentication and Authorization for the Java Web Service
        5. Configuring Credentials for the .NET Client
        6. Configuring Credentials for the Java Client
      4. Web Service Exception Handling
        1. Web Service URL Not Available
          1. .NET Client to Unavailable Java Web Service
          2. Java Client to Unavailable .NET Web Service
        2. Web Service Method Not Available
          1. .NET Client to Unavailable Java Web Service Method
          2. Java Client to Unavailable .NET Web Service Method
        3. Security-Specific Exceptions
          1. Unauthorized .NET Client to Java Web Service
          2. Unauthorized Java Client to .NET Web Service
        4. Application-Specific Exceptions
          1. How SOAP Defines Exceptions
          2. .NET Client Connecting to a Java Web Service Method that Throws an Exception
          3. Java Client Connecting to a .NET Web Service Method that Throws an Exception
        5. Exception Conclusion
      5. Using UDDI
        1. Interoperability Benefits of Using UDDI
        2. UDDI Registries
        3. Using UDDI Services in Windows Server 2003
          1. Microsoft UDDI SDK
          2. Exploring the UDDI Registry
          3. Consuming by Using a .NET Client
          4. Consuming by Using a Java Client
          5. The UDDI Clients—Under the Covers
          6. Other UDDI APIs
          7. Can UDDI Be Used for .NET Remoting?
          8. Best Practices
      6. Pulling It All Together—Web Services Interoperability
        1. Installing the Solution
        2. Running the Solution
        3. How the Solution Works
      7. Recommendations for Web Services Interoperability
        1. Define Data Types First
        2. Keep Data Types Simple and Based on XSD
        3. Keep Compliant with WS-I Basic Profile 1.0
        4. Standardize on a Document/Literal Style
        5. Ensure the Latest Version of Java Web Services Distribution
        6. Allow Abstraction with an Agent-Service Pattern
        7. Use UDDI for the Discovery of Web Services
      8. Interoperability Performance Test
      9. Summary
  7. III. Interoperability Technologies: Resource Tier
    1. 7. Creating a Shared Database
      1. Open Data Access
        1. Creating a Sample Database Table
        2. Connecting to Microsoft SQL Server 2000 Using JDBC
          1. Downloading and Installing the Driver
          2. Simple JDBC Access
        3. Connecting to Microsoft SQL Server 2000 Using ADO.NET
          1. Simple ADO.NET Access
      2. Using JDBC and ADO.NET to Share Data
        1. The DAO Pattern
        2. Interoperability Benefits
        3. Extending the DAO to Include an Update Operation
          1. How the Update Operation Works
      3. Summary
    2. 8. Asynchronous Interoperability, Part 1: Introduction and MSMQ
      1. Asynchronous Calls Using Web Services
        1. The Sample Code
        2. How the Callback Works
        3. Applicability of Callbacks in Client Applications
      2. Using MSMQ
        1. Installing MSMQ on Windows Server 2003
        2. Simple Message Queue Operations in .NET
        3. Java Interoperability Options with MSMQ
          1. Using a JMS Provider for MSMQ
          2. Using SRMP on HTTP
          3. Using a Java-to-COM Bridge
            1. Benefits and shortfalls of this approach
          4. Creating a Web Service Interface
        4. Creating a Web Service Interface for MSMQ
          1. Configuring and Setting Security for the Web Service Interface
        5. Client Access to the MSMQ Web Service Interface
          1. Accessing the MSMQ Web Service Interface with a .NET Client
          2. Accessing the MSMQ Web Service Interface with a Java Client
        6. Extending the Sample
          1. Accessing the Extended Sample with a .NET Client
          2. Accessing the Extended Sample with a Java Client
        7. Web Service Interface to MSMQ—What You Lose
          1. Reliable Messaging
            1. Looking ahead to WS-Reliable Messaging
          2. Transactions
            1. Looking ahead to WS-Transaction
          3. True Callback
      3. Summary
    3. 9. Asynchronous Interoperability, Part 2: WebSphere MQ
      1. IBM WebSphere MQ
        1. Downloading and Installing
        2. Configuring WebSphere MQ
        3. Installing Publish/Subscribe Support for WebSphere MQ
        4. WebSphere MQ Support for Java
        5. WebSphere MQ Support for .NET
        6. Differences Between the Java and .NET Classes
      2. Introduction to JMS
        1. JMS Message Types and Concepts
        2. JMS, WebSphere MQ, and Interoperability
          1. Using JMSAdmin to Configure JNDI
          2. Using JMS to Access WebSphere MQ Queues
          3. Using the MA7P to Send a Message to a JMS Listener
          4. Using JMS Pub/Sub to Access WebSphere MQ Topics
        3. Topic-Driven Interoperability with Message Driven Beans
          1. Configuring MDB for JBoss and WebSphere MQ
          2. Deploying the MDB
          3. Configuring the .NET Web Service
          4. Running the Sample
          5. Key Elements of the Sample
      3. SOAP Support for WebSphere MQ
        1. SOAP/JMS Support in GLUE
          1. Running the Sample Code
          2. Key Elements of the GLUE Sample
          3. SOAP/JMS Messages and Interoperability with .NET
        2. IBM SupportPac MA0R
      4. Summary
    4. 10. Asynchronous Interoperability, Part 3: Bridging with Host Integration Server
      1. MSMQ-MQSeries Bridge
      2. Architecture Prerequisites for the MSMQ-MQSeries Bridge
      3. Installing the Software Required for the MSMQ-MQSeries Bridge
        1. Installing MSMQ with Active Directory and Routing Support
        2. Installing WebSphere MQ Client Components on MQBRIDGE1
        3. Installing Host Integration Server 2000
        4. Installing Host Integration Server 2000 SP1
        5. Installing WebSphere MQ 5.3 on WMQ1
      4. Configuring Active Directory for MSMQ to WebSphere MQ Communication
        1. Setting Up Sites and MSMQ Routing Support
        2. Configuring the Queues
        3. Creating the MSMQ Queues
      5. Configuring the MSMQ-MQSeries Bridge
        1. Exporting the Configuration
      6. Configuring the WebSphere MQ Server
        1. Creating the Queues in WebSphere MQ
        2. Exporting the Client Channel Table File
        3. Completing the Configuration of the MSMQ-MQSeries Bridge
      7. Testing the MSMQ-MQSeries Bridge Setup
        1. Testing MSMQ to WebSphere MQ Connectivity
        2. Testing WebSphere MQ to MSMQ Connectivity
        3. Testing the Bridge with Previous Code Samples
      8. Summary
    5. 11. Asynchronous Interoperability, Part 4: BizTalk Server
      1. Introducing BizTalk Server 2004 Beta 1
        1. Prerequisites for BizTalk Server 2004 Beta 1
        2. Installing BizTalk Server 2004 Beta 1
      2. Sample Use Case and Code
        1. Building the Web Services
        2. The Stock Processes Orchestration: Step by Step
        3. Deploying the Orchestration
          1. Deploying Manually
            1. Creating the late-bound incoming port
            2. Creating the late-bound outgoing port
          2. Deploying with a Script
          3. Starting the Orchestration
        4. Testing the Orchestration
        5. Extending the Sample
          1. WebSphere MQ/MQSeries Support
          2. Inbound Web Services Support
          3. Exception Handling
          4. Enabling Transactions
      3. Asynchronous Interoperability: How to Decide
      4. Summary
  8. IV. Advanced Interoperability
    1. 12. Presentation Tier Interoperability
      1. What Is Presentation Tier Interoperability?
        1. Requirements for Interoperating at the Presentation Tier
        2. Challenges of Interoperating at the Presentation Tier
        3. Avoiding a Disjoint User Experience
      2. Shared Session State
        1. Setting Up the Shared Session State Database
        2. Installing the ASP.NET Sample Code
        3. Installing the J2EE Sample Code
        4. Testing the Deployment
        5. What This Sample Shows
        6. Viewing the Data Stored in SQL
        7. How the Sample Works
          1. Deciding Where to Store the Shared Session Data
          2. Creating a Shared Session API for ASP.NET and JSP/Servlets
            1. Calling the shared session API from ASP.NET
            2. Calling the shared session API from a Servlet
            3. Calling the shared session API from a JSP
          3. Creating a Registration Process
        8. Interoperability Performance Test—Shared Session State
      3. Shared Authentication
        1. Using Shared Authentication
        2. How the Shared Authentication Solution Works
      4. Summary
    2. 13. Web Services Interoperability, Part 1: Security
      1. The Need for WS-Security
      2. WS-Security
      3. Web Services Enhancements (WSE)
        1. Downloading and Installing Microsoft WSE
      4. Sample Code
        1. Authentication Using WS-Security
          1. Configuring the .NET Web Service
          2. Configuring the Java Web Service
          3. Setting Up Certificates
            1. Creating the Windows X.509 certificate
            2. Creating the Java certificate
          4. Running the .NET Client
          5. Running the Java Client
          6. Tracing the Output
          7. Proving the Sample
          8. How the Samples Work
          9. Other Methods of Authentication
          10. Thinking About Authorization
        2. Encryption Using WS-Security
          1. Configuring the .NET Web Service
          2. Configuring the Java Web Service
          3. The Symmetric Key
          4. Running the Java Client
          5. Running the .NET Client
          6. How the Samples Work
      5. Summary
    3. 14. Web Services Interoperability, Part 2: Sending Binary Data
      1. DIME and WS-Attachments
      2. Samples
        1. Downloading and Installing Microsoft WSE
        2. Setting Up the Document Web Service
        3. Running the Java Client
        4. Running the .NET Client
        5. Two-Way File Operations
      3. Looking Ahead—PASWA
      4. Summary
    4. 15. Web Services Interoperability, Part 3: Routing
      1. WS-Routing
        1. Downloading and Installing Microsoft WSE
      2. Sample Code
        1. Setting Up the .NET Intermediary
        2. Setting Up the .NET Web Service
        3. Setting Up the Java Web Service
        4. Running the .NET Client
        5. Running the Java Client
        6. Using the Same Proxy File
      3. WS-Referral
      4. WS-Addressing
      5. Summary
    5. 16. Interoperability Futures
      1. Topics and Goals of the Book
        1. Thoroughly Cover the Topic
        2. Maintain Neutrality Regarding .NET and Java
        3. Provide Sample Code
      2. Time for More?
      3. Predicting the Future
        1. Acceptance and Agreement of Standards
        2. Vendor Adoption of Standards
        3. Competition at the Implementation Level
        4. Architecting Interoperability
        5. Management, Operations, and Deployment
        6. Shift to Loosely Coupled Thinking
        7. Desktop Integration
      4. Summary
    6. About the Author
  9. Index
  10. About the Author
  11. Copyright

Product information

  • Title: Microsoft® .NET and J2EE Interoperability Toolkit
  • Author(s): Simon Guest
  • Release date: October 2003
  • Publisher(s): Microsoft Press
  • ISBN: 9780735619227