You are previewing J2EE Web Services on BEA WebLogic.
O'Reilly logo
J2EE Web Services on BEA WebLogic

Book Description

"Very impressive work. This book is valuable for beginning and intermediate technologists." Dwight Mamanteo, Technical Manager, BEA Systems

"Provides explanations of Web services, tuning tips, and discussions on security that will likely be of benefit to developers as they create their Web services." Robert W. Husted, Member, Technical Staff, Requisite Software

  • Build Web services infrastructure based on service-oriented architecture (SOA)

  • Implement enterprise-class Web services using WebLogic and J2EE

  • Complete lifecycle coverage with best practices: design, prototyping, development, testing, deployment, and management

  • Real-world enterprise Web services implementation with J2EE and WebLogic

    You've seen plenty of theory about Web services. This book is about the reality: what it takes to successfully implement J2EE Web services with BEA WebLogic in complex enterprise environments. Anjali Anagol-Subbarao, one of the world's leading Web services experts, offers powerful insights for every stage of the Web services lifecycle: design, prototyping, development, testing, deployment, and management.

    Anagol-Subbarao draws on her experience architecting and building Web services infrastructure for HP's worldwide operations and takes on the challenges that face every enterprise implementer. She demonstrates how to design robust Web services that align with business processes, smoothly integrate with existing infrastructure, deliver superior performance and security, and can be managed effectively. Coverage includes

  • Primers on WebLogic Workshop, WebLogic Server, WLI, and J2EE Web services technology

  • Building effective service-oriented architectural (SOA) frameworks

  • Translating designs into working code

  • Designing for end-to-end security and tuning for high performance

  • Testing Web services and deploying them to production environments

  • Addressing the unique challenges associated with managing distributed Web services

  • © Copyright Pearson Education. All rights reserved.

    Table of Contents

    1. Copyright
      1. Dedication
    2. Hewlett-Packard® Professional Books
    3. Acknowledgments
    4. About the Author
    5. Foreword
    6. Introduction
      1. About This Book
      2. Who Should Read This Book?
      3. How Is This Book Organized?
        1. Chapter 1, “Introduction to Web Services”
        2. Chapter 2, “Essentials of J2EE”
        3. Chapter 3, “Introduction to WebLogic Platform”
        4. Chapter 4, “Benefiting from SOA and Web Services”
        5. Chapter 5, “Enabling Enterprise-Class Web Services”
        6. Chapter 6, “Designing Web Services”
        7. Chapter 7, “Developing and Deploying Web Services”
        8. Chapter 8, “Using Controls, Bindings, and Parsers”
        9. Chapter 9, “Connecting to a Distributed Environment”
        10. Chapter 10, “Managing Business Processes”
        11. Chapter 11, “Security of Web Services”
        12. Chapter 12, “Enhancing the Performance of Web Services”
        13. Chapter 13, “Testing of Web Services”
        14. Chapter 14, “Managing Web Services”
    7. 1. Introduction to Web Services
      1. Developments Leading up to Web Services
        1. What Are Web Services?
        2. Platforms for Developing Web Services
      2. Web Services Standards Organizations
      3. Web Services Standards
        1. XML
          1. DTD
          2. XML Schema
          3. XML Namespace
        2. SOAP
          1. SOAP Message
          2. SOAP Encoding Rules
          3. SOAP HTTP Bindings
          4. SOAP with Attachments
        3. WSDL
        4. UDDI
        5. WS-Security
      4. Summary
    8. 2. Essentials of J2EE
      1. Overview of J2EE
      2. The J2EE Architecture
        1. J2EE Components
          1. Client-Tier Components
          2. Web-Tier Components
          3. Business-Tier Components
          4. Enterprise Information System Tier
        2. J2EE Containers
          1. Container Services
        3. J2EE Services and APIs
          1. Java Authentication and Authorization Service (JAAS)
          2. Java API for XML Processing (JAXP)
          3. J2EE Connector Architecture (J2CA)
          4. Java Database Connectivity (JDBC) API
          5. Java Message Service (JMS)
          6. Java Transaction API (JTA)
          7. Java Naming and Directory Interface (JNDI)
          8. JavaMail API
          9. Security and J2EE
        4. Assembling a J2EE Application
          1. Packaging
          2. Classloader
      3. Web Services Support in J2EE
        1. J2EE 1.4 Specification
          1. Java API for XML-Based RPC (JAX-RPC)
          2. Java API for XML Messaging (JAXM)
          3. JAXM Versus JAX RPC
          4. Java API for XML Registries (JAXR)
          5. Java Architecture for XML Binding (JAXB)
          6. SOAP with Attachments API for Java (SAAJ)
      4. Summary
      5. References
    9. 3. Introduction to WebLogic Platform
      1. Building Blocks of the WebLogic Platform
      2. WebLogic Server
      3. WebLogic Workshop
        1. Workshop Integrated Development Environment
        2. Workshop Runtime Framework
        3. WebLogic Control Framework
        4. Web Flow Framework
        5. Project Beehive
      4. WebLogic JRockit
      5. WebLogic Integration
      6. WebLogic Portal
      7. Support for Web Services
        1. Support for SOAP in WebLogic Server
        2. Support for WSDL in WebLogic Server
        3. Support for Creating Web Service Clients
        4. Building and Deploying Web Services
      8. Summary
    10. 4. Benefiting from an SOA and Web Services
      1. Understanding the SOA
        1. Architecture
        2. Infrastructure
      2. Using Web Services to Implement an SOA
        1. Defining the Service Interface
        2. Implementing the Service Interface
        3. Registering the Services
        4. Factors Driving the Business Decision
      3. Going Live with Web Services: HP Case Study
        1. Challenges Faced
        2. Goals of the Project
        3. Web Services Solution
        4. Benefits of the Solution
      4. Summary
    11. 5. Enabling Enterprise-Class Web Services
      1. Designing Interoperability
        1. Conforming to Standards
        2. Designing WSDL First
        3. Selecting SOAP Messaging
          1. Styles: Document and RPC
          2. Use: Literal and Encoding
      2. Publishing Enduring Web Services Contracts
        1. Integrating Through Loose Coupling
        2. Choosing an XML Strategy
        3. Versioning New Releases
          1. Versioning the Public Interface
          2. Versioning the Implementation
          3. Versioning Lifecycle
      3. Effectively Using Business-Tier Systems
        1. Facilitating Asynchronous Communication
        2. Using a Coarsely Grained Approach
        3. Exposing Business Logic Components
      4. Planning a Robust Production Environment
        1. Security
        2. Scalability and Performance
        3. Manageability
          1. Web Services Networking
      5. Summary
    12. 6. Designing Web Services
      1. Designing WSDL with XMLSPY
        1. XMLSPY WSDL Editor
        2. Specifying Types
        3. Specifying Services
        4. Specifying portTypes
        5. Specifying Messages
        6. Specifying Bindings
        7. Validating the Completed WSDL
        8. Adding Operations to the WSDL
      2. Prototyping Using Workshop
        1. Main Components of Workshop
        2. Creating a Web Service from the WSDL
        3. Web Service as JWS Files
        4. Testing the Web Service Using Workshop
        5. Testing the Web Service Using a Client
          1. Java Client
          2. Apache Client
          3. .NET Client
      3. Design for Versioning
        1. Versioning the Interface
        2. Versioning the Implementation
      4. Summary
    13. 7. Developing and Deploying Web Services
      1. Building an Asynchronous Web Service
        1. Callbacks
        2. Conversations
          1. Conversation Context
          2. Conversation Phase
          3. Testing the Conversation
          4. Clients and Conversations and Callbacks
        3. Buffering
          1. Adding Message Buffer to a Method
          2. Adding Message Buffers to a Callback
        4. Polling as an Alternative to Callbacks
      2. Using SOAP with Attachments
        1. Sending a SOAP Attachment
        2. Receiving a SOAP Attachment
        3. SOAP Attachments in the Real World
        4. Future Approach for Dealing with Binary Data
          1. WebLogic and DIME Attachments
      3. Transforming XML Messages
        1. XQuery Map
        2. ECMAScript
      4. Discovering Web Services Through UDDI
        1. UDDI Explorer
        2. Web Service Control
      5. Deploying to Production Environment
        1. Manual Creation of Server Resources
          1. Automatic Assembly Using the servicegen Ant Task
          2. Manual Assembly Using Ant Tasks
        2. Viewing and Testing the Assembled Web Service
      6. Summary
    14. 8. Using Controls, Bindings, and Parsers
      1. Using Workshop Control Framework
        1. Building a Custom Control
        2. Building a Database Control
        3. Building an EJB Control
        4. Using an ISV Control
          1. Sample ISV Control
          2. Developing an ISV Control
        5. Using Local Controls and Control Projects
        6. Controls and Software Reuse
      2. Binding Java to XML Using XML Beans
        1. Understanding XML Beans
        2. XML Beans Hierarchy
          1. Support for User-Defined Types
          2. Support for Built-In Types
        3. Using XQuery and XPath Expressions
        4. Using XML Cursors
      3. Parsing XML
        1. Using the StAX Parser
        2. Comparison to SAX and DOM
      4. Summary
    15. 9. Connecting to a Distributed Environment
      1. Building EJBs in WebLogic Workshop
        1. Example for Creating EJBs
        2. Creating an Entity Bean
          1. Creating an EJB Project
          2. Generating Entity Bean from Database Table
          3. Understanding EJB Projects and ejbGen
          4. Building and Deploying Entity Beans
          5. Other Ways of Creating EJBs
        3. Creating a Session Bean
          1. Adding an ejb-local-ref Tag
          2. Adding Component Methods
          3. Building and Deploying the Session Bean
        4. Strengthening EJB Deployment Using WebLogic Server
      2. Connecting to EIS Using the Application Integration Framework
        1. Understanding Elements of JCA
          1. Common Client Interface
          2. Resource Adapter
        2. Components of WLI
          1. Integration Framework
            1. Steps to Building an Integration Solution
            2. Adapter Development
            3. Application Views
            4. Interaction Between the Adapter and Application View
            5. Application Integration Design Console
            6. Application View Control
            7. Application Integration Using the SAP Adapter
          2. Adapter Development Kit (ADK)
      3. Summary
    16. 10. Managing Business Processes
      1. Web Services and Business Process Management
        1. Business Process Management
        2. Orchestration, Choreography, and Collaboration
      2. Using WLI for Business Process Management
        1. Three Stages of a BPM Solution
          1. Process Modeling
          2. Process Execution
          3. Process Monitoring
        2. Building a Business Process in Workshop
          1. Example: Change Order Request Process
          2. Create New Application and New Process
          3. Create Client Request to Start Process
          4. Add a Web Service
          5. Add a Decision Node
          6. Add a Database Control
          7. Add Another Decision Node
          8. Write to SAP or File
          9. Execution of Process
          10. Process Monitoring
      3. Importing-Exporting PD4J ←→ WS-BPEL
        1. Specification
        2. Processes
        3. Grammer of WS-BPEL
          1. BPEL and WLI
      4. Implementing ebXML in WLI
        1. ebXML and Web Services
        2. WLI and ebXML
      5. Summary
    17. 11. Security of Web Services
      1. Overview on Security Considerations
      2. Two-Way SSL
        1. How Does SSL Work?
        2. Two-Way SSL in WebLogic Server
        3. Issues with SSL Encryption
      3. XML Firewalls
      4. WS-Security
        1. WS-Security Documents
          1. WSS Core: SOAP Message Security Document
          2. WSS: Username Token Profile Document
          3. WSS: X.509 Certificate Token Profile Document
        2. WS-Security and Interoperability
        3. Designing for Security Using WSS
        4. WS-Security in WebLogic
      5. Security Standards in Identifying Management
        1. Liberty Alliance
        2. SAML
      6. Summary
    18. 12. Enhancing the Performance of Web Services
      1. Understanding Performance Constraints
        1. Creating and Terminating HTTP Connections
        2. Converting to and from XML
        3. Processing SOAP Messages
        4. Securing Web Services
      2. Identifying Performance Bottlenecks
        1. Factors Impacting Performance
        2. HP OpenView Transaction Analyzer
      3. Improving Web Service Performance
        1. SOAP Implementation Options
          1. SOAP Engines
          2. SOAP with Attachments
          3. Simple SOAP Data Types
        2. XML Parser Selection
          1. Comparison of DOM, SAX, STAX, and JAXB
          2. Performance Enhancement with XML Beans
        3. XML Compression
          1. Sending Binary Data in XML Message
          2. Using XMill for Large Files
        4. XML Accelerators
          1. HP E-Commerce/XML Accelerator
        5. SSL Accelerators
      4. Improving the Business Logic Layer and Database Performance
        1. Leveraging Patterns
          1. Service Locator
          2. Session Facade
          3. Value List Handler and Data Access Object Patterns
        2. Tuning EJBs
          1. Setting EJB Pool Size for Session and Message-Driven Beans
          2. Setting Caching Size for Stateful Session and Entity Beans
          3. Activation and Passivation of Stateful Session EJBs
          4. Configuring the Deployment Descriptor
        3. Tuning the Database
          1. Deferring Database Locking
          2. Tune the Connection Pool Size
      5. Tuning the JVM
      6. Summary
    19. 13. Testing of Web Services
      1. Approach to Web Services Testing
        1. Differences from Traditional Testing
        2. Extending Current Testing Methods
          1. Establish Service-Level Agreements (SLA)
          2. Perform Component-Level Validation and Benchmarking
          3. Mandate Stress Testing
          4. Extend Test Scenarios to Address Web Services Functions
        3. Invest in Testing Tools
      2. Building Your Test Suite
        1. Test View in WebLogic Workshop
        2. Unit Testing
        3. Functional Testing
          1. Testing Tools: SOAPtest and Empirix e-Tester
          2. Testing Your Web Service Using SOAPtest
          3. Testing Your Web Service with Empirix's e-Tester
        4. Integration Testing
        5. Interoperability Testing
        6. Regression Testing
        7. Performance Testing
          1. HP OpenView Internet Services
          2. Performance Profiling
          3. Other Performance Test Tools
        8. Load Testing
          1. Using Empirix for Load Testing
        9. Stress Testing
        10. Capacity Planning Testing
      3. Summary
    20. 14. Managing Web Services
      1. Why Managing Web Services Is Different
        1. Managing at Different Levels
        2. Comparing with Traditional IT Management
      2. Evolution of Management Stack
      3. Using JMX Architecture
        1. MBean Methods
        2. Types of MBeans
        3. MBean Server
        4. Using JMX on WebLogic Server
          1. WebLogic Admin Console
          2. WebLogic Command-Line Utility
          3. Conf2Admin
        5. Using JMX with HP OpenView
      4. Using J2EE Management Specification
      5. Using Web Services Distributed Management
        1. Management Using Web Services (MUWS) Specification
        2. WS-Resource Framework
        3. WS-Notification
        4. Management of Web Services (MOWS)
      6. Selecting a WSM Tool
        1. Core Capabilities
        2. Business Monitoring
        3. Controlling Management Functions
        4. Other General Evaluation Criteria
      7. Lifecycle Management for Web Services
        1. Concept of Business Service
        2. WSM
        3. Effective Improvements Using LCM4WS
      8. Web Services Network Monitoring
      9. Summary