O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

WSO2 Developer’s Guide

Book Description

WSO2 Made Simple ? dive deep into the core concepts of WSO2 to overcome the challenges faced while using the Enterprise Integrator

About This Book

  • Design, create, and publish services in the WSO2 technology
  • Integrate the WSO2 Enterprise Integrator with other components and servers
  • Log and test deployed services

Who This Book Is For

If you are a Java solutions architect or developer and are keen to understand how to build enterprise applications with WSO2, this book is for you. No prior knowledge of WSO2 is expected.

What You Will Learn

  • Configure WSO2 Enterprise Integrator server in a production environment
  • Create SOAP Proxies and REST APIs
  • Interact with WSO2 Message Broker
  • Write services using the new language: Ballerina
  • Schedule automatic tasks for the services you create
  • Manage log messages depending on the log level of the system
  • Integrate with social networks such as Twitter, Facebook, Instagram, and Yammer
  • Test SOAP Services using the Tryit feature and SoapUI tool
  • Work with Quality of Services

In Detail

WSO2 Enterprise Integrator brings together the most powerful servers provided by the WSO2 company for your SOA infrastructure. As an Enterprise Service Bus (ESB), WSO2 Enterprise Integrator provides greater flexibility and agility to meet growing enterprise demands, whereas, as a Data Services Server (DSS), it provides an easy-to-use platform for integrating data stores, creating composite views across different data sources, and hosting data services.

Using real-world scenarios, this book helps you build a solid foundation in developing enterprise applications with powerful data integration capabilities using the WSO2 servers.

The book gets you started by brushing up your knowledge about SOA architecture and how it can be implemented through WSO2. It will help build your expertise with the core concepts of ESB such as building proxies, sequences, endpoints, and how to work with these in WSO2.

Going further, you will also get well-acquainted with DSS data service concepts such as configuring data services, tasks, events, testing, and much more.

The book will also cover API management techniques. Along with ESB and DSS, you will also learn about business process servers, the rules server and other components that together provide the control and robustness your enterprise applications will need.

With practical use cases, the book covers typical daily scenarios you will come across while using these servers to give you hands-on experience.

Style and approach

The book is a complete guide and helps you get the right start - from understanding SOA architectures to getting valuable experience with two important integration servers such as ESB and DSS. It will include some real-world practical scenarios to help you master the best practices followed right across the industry and overcome the challenges you're likely to face on a daily basis.

Table of Contents

  1. Preface
    1. What this book covers
    2. What you need for this book
    3. Who this book is for
    4. Conventions
    5. Reader feedback
    6. Customer support
      1. Downloading the example code
      2. Downloading the color images of this book
      3. Errata
      4. Piracy
      5. Questions
  2. Getting Started with SOA and WSO2
    1. SOA principles
    2. SOA organization
    3. Technology for SOA
    4. Downloading WSO2 Enterprise Integrator
    5. WSO2 Update Manager
      1. Add an existing product to WUM repository
      2. Download a product using WSO2 Update Manager
      3. Check for product updates using WSO2 Update Manager
      4. Deleting a product from the WSO2 Update Manager repository
    6. Installing WSO2 Enterprise Integrator
      1. Starting components manually
        1. Starting/stopping WSO2 Enterprise Integrator
        2. Starting/stopping WSO2 EI Analytics
        3. Starting/stopping WSO2 EI Business Process
        4. Starting/stopping WSO2 EI Broker
      2. Starting all the products
    7. WSO2 EI Configuration
      1. Configuring JDBC drivers
      2. Configuring transports
      3. Configuring message formatters and message builders
    8. Summary
  3. Developing Integration Projects with WSO2EI Tooling
    1. Installing and running WSO2EI Tooling
    2. Creating carbon projects
      1. ESBConfig projects
        1. Creating a proxy
        2. Creating a REST API
        3. Creating a sequence
        4. Creating an endpoint
      2. Registry Resource Project
      3. Data Service Project
      4. Composite Application Project
      5. ESB Solution Project
    3. Debugging mediation
    4. Data mapping
    5. Summary
  4. Building Web Services
    1. Mediators
      1. The property mediator
      2. The log mediator
      3. The send mediator
      4. The respond mediator
      5. The loopback mediator
      6. The drop mediator
      7. The sequence mediator
      8. The script mediator
    2. Sequences
      1. Main sequence
      2. The fault sequence
      3. A custom sequence
    3. Proxies
      1. The transformer proxy
      2. Secure proxy
      3. WSDL based proxy
      4. Logging proxy
      5. Pass through proxy
      6. Custom proxy
    4. APIs
      1. URL mapping
      2. URI template
    5. Inbound endpoints
      1. Listening
      2. Polling
      3. Event based
      4. Custom
    6. Tasks
      1. Scheduling data services
      2. Scheduling other services
    7. Summary
  5. Building Data Services
    1. Configuring data sources
    2. Create wizard
      1. Data service details
      2. Adding datasources
      3. Adding queries
        1. Adding new queries using XML responses
        2. Adding new queries using JSON responses
        3. Adding new queries using a filter
        4. Adding new queries for inserting data
        5. Adding new queries for updating data
        6. Adding new queries for deleting data
      4. Adding operations
      5. Adding resources
    3. Creating CRUD data services
    4. Creating data services using WSO2 EI Tooling
    5. Summary
  6. Transforming the Content of the Payload
    1. Creating new content
      1. The PayloadFactory mediator
      2. Script mediator
    2. Change the format of the content
      1. Message type
      2. The XQuery mediator
    3. Enrich the message
      1. The Enrich mediator
    4. Message transformation
      1. The XSLT mediator
      2. The FastXSLT mediator
    5. Summary
  7. Conditional Route
    1. Checking the payload content
      1. Validating XML
      2. Validating JSON
    2. Boolean filtering
    3. Multiple filtering
    4. Advanced routing
      1. The conditional router mediator
      2. The rule mediator
    5. Summary
  8. Quality of Service
    1. Security
      1. Security scenarios
        1. Scenario 1: UsernameToken
        2. Scenario 2: Non-repudiation
        3. Scenario 3: Integrity
        4. Scenario 4: Confidentiality
        5. Scenario 5: Sign and encrypt - X509 authentication
        6. Scenario 6: Sign and encrypt - Anonymous clients
        7. Scenario 7: Encrypt only - UsernameToken authentication
        8. Scenario 8: Sign and encrypt - UsernameToken authentication
        9. Scenario 9: Secure conversation - Sign only - Service as STS - Bootstrap policy - Sign and encrypt, X509 authentication
        10. Scenario 10: Secure conversation - Sign only - Service as STS - Bootstrap policy - Sign and encrypt, anonymous clients
        11. Scenario 11: Secure conversation - Sign and Encrypt - Service as STS - Bootstrap policy - Sign and encrypt, X509 authentication
        12. Scenario 12: Secure conversation - Sign only - Service as STS - Bootstrap policy - Sign and encrypt, anonymous clients
        13. Scenario 13: Secure conversation - Sign and Encrypt - Service as STS - Bootstrap policy - Sign and encrypt, anonymous clients
        14. Scenario 14: Secure conversation - Encrypt only - Service as STS - Bootstrap policy - Sign and encrypt, UsernameToken authentication
        15. Scenario 15: Secure conversation - Sign and encrypt - Service as STS - Bootstrap policy - Sign and encrypt, UsernameToken authentication
        16. Scenario 16: Kerberos token-based security
      2. Securing the transport
        1. Creating a certificate for the EI server
        2. Configuring HTTPS transport
      3. Securing REST APIs
        1. Basic authentication
      4. Authentication against WSO2 Identity Server
      5. Securing SOAP Proxies
      6. Invoking secure backend
        1. Basic-auth authentication
        2. OAuth authentication
          1. Getting a token from the WSO2 API manager
        3. WS-Security
    2. Throttling
    3. Caching
    4. Summary
  9. Tasks Scheduling
    1. Configuring the server
      1. Setting the server mode
      2. Configuring a clustered task server
    2. Scheduling integration services
    3. Scheduling data services
    4. Custom tasks
    5. Summary
  10. WSO2 Enterprise Integration Logging
    1. General enterprise integration logging
    2. Logging the orchestration
      1. Log mediator
        1. Adding log properties
      2. Script mediator
    3. Logging per API and per proxy service
    4. Summary
  11. WSO2 Enterprise Integration Testing
    1. Testing with a built-in tester
    2. Testing with SOAPUI
      1. Creating a web service client
      2. Creating a mock service
      3. Creating a test case
    3. Other ways of testing
    4. Summary
  12. Integrating with VFS
    1. Configuring the server
      1. Large files
    2. Reading files
      1. VFS properties
        1. transport.vfs.FileURI
        2. transport.vfs.ContentType
        3. transport.vfs.FileNamePattern
        4. transport.PollInterval
        5. transport.vfs.ActionAfterProcess
        6. transport.vfs.ActionAfterFailure
        7. transport.vfs.MoveAfterProcess
        8. transport.vfs.MoveAfterFailure
        9. transport.vfs.ReplyFileURI
        10. transport.vfs.ReplyFileName
        11. transport.vfs.MoveTimestampFormat
        12. transport.vfs.Streaming
        13. transport.vfs.ReconnectTimeout
        14. transport.vfs.MaxRetryCount
        15. transport.vfs.Append
        16. transport.vfs.MoveAfterFailedMove
        17. transport.vfs.FailedRecordsFileName
        18. transport.vfs.FailedRecordsFileDestination
        19. transport.vfs.MoveFailedRecordTimestampFormat
        20. transport.vfs.FailedRecordNextRetryDuration
        21. transport.vfs.Locking
        22. transport.vfs.FileProcessCount
        23. transport.vfs.FileProcessInterval
        24. transport.vfs.ClusterAware
        25. transport.vfs.FileSizeLimit
        26. transport.vfs.AutoLockReleaseInterval
      2. Local filesystem
      3. FTP and FTPS
      4. SFTP
    3. Writing files
    4. Transferring files
    5. File connector
      1. Configuring
      2. Working
    6. Summary
  13. Integrating with JMS - WSO2 EI Message Brokering
    1. Creating message queues
    2. Publishing messages to a queue
    3. Consuming messages from a queue
    4. Dead Letter Channel
    5. Connectors
      1. Types of Connectors
        1. SOAP-based connectors
        2. REST-based connectors
        3. Java API-based connectors
    6. Summary
  14. Introduction to Ballerina
    1. The Ballerina language history
    2. The main concepts of Ballerina
      1. Connectors
      2. Type system
      3. Community
    3. Ballerina tools
      1. Composer
      2. Docerina
      3. Testerina
      4. Packerina
    4. Working with Ballerina
    5. Summary