Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Objective: Introduction to ESB shows

Table of Contents

Introduction

This samples demonstrates how a message could can be made to pass passed through the WSO2 ESB and logged before it is delivered to its ultimate receiver. This is the most basic, introductory usecase of the ESB.

Prerequisites

 

 

Building the Sample

 

 

Executing the Sample

 

Code Block
languagehtml/xmllinenumberstrue
<definitions xmlns="http://ws.apache.org/ns/synapse">             
                                                                                                                                                                                                                                                                                                                                         
    <sequence name="main">                                                                                                                                                                             
 
      <in>                                                                                                                                                                                           
 
          <!-- log all attributes of messages passing through -->                                                 
                                                                                  
            <log level="full"/>                   
                                                                                                                                                    
            <!-- Send the message to implicit destination -->
                                                                                                                                         
            <send/>                                                                                                                  
                                                                 
        </in>                         
                                                                                                                                                                
        <out>
                                                                                                                                                                                         
            <!-- log all attributes of messages passing through -->                     
                                                                                                              
            <log level="full"/>                                                                                                                                                                     
               <!-- send the message back to the client -->                                                                                       
                                                       
            <send/>
                                                                                                                                                                                   
        </out>                                                                                                                                   
                                                     
    </sequence>                                                                                                                                                                                                                                                                                                                             
                                                                
</definitions>

 

The Stock quote client can operate in the following modes for this example:

...

Refer to Sample 1 Simple Content-Based Routing (CBR) of Messages.

Prerequisites
  • Start the Synapse configuration numbered 0: for example, wso2esb-samples.sh -sn 0
  • Start the Axis2 server and deploy the SimpleStockQuoteService if not already deployed.

...

You will see exactly the same behavior as per the previous example when you run this scenario. However, this time the difference is at the client, as it sends the message to the WS-Addressing To address http://localhost:9000/services/SimpleStockQuoteService, but the transport specifies ESB as the HTTP Proxy.

Analysis of Results

Excerpt
hiddentrue

Example of message mediation in WSO2 ESB.