This documentation is for WSO2 Enterprise Integrator version 6.1.1 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc

Versions Compared

Key

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

Message mediation mode is one of the operational modes of WSO2 EI where EI functions the ESB profile where the ESB profile functions as an intermediate message router. When operating in this mode, it can filter, transform, drop or forward messages to an endpoint based on the given parameters. A unit of the mediation flow is a mediator. Sequences define the message mediation behavior of the EIESB profile. A sequence is a series of mediators, where each mediator is a unit entity that can input a message, carry out a predefined processing task on the message, and output the message for further processing. 

...

Debugging is where you want to know if these units, which function as separate entities are operating as intended, or if a combination of these units are operating as a whole as intended. WSO2 EI packs the EI The ESB profile packs the Mediation debugger that enables you to debug the EI message ESB profile message mediation flow in the server. Tooling support for the EI Mediation debugger is provided by the WSO2 EI Tooling Plugin.

Creating the

...

artifact

Follow the steps below to create a sample EI artifactthe ESB profile artifact, to which you apply mediation.

  1. Install the WSO2 EI Tooling Plugin and run it. For instructions, see Installing Enterprise Integrator Tooling. 
  2. Create the EI artifact ESB profile artifact using the WSO2 EI Tooling Plugin. For instructions, see Managing Integration Flows via Tooling. 
  3. Deploy the artifact you created on WSO2 EIthe ESB profile. For instructions, see Packaging your Artifacts into Composite Applications.

...

  1. Click Run in the top menu of the WSO2 EI Tooling Plugin, and then click Debug Configurations.
  2. Double click EI Mediation Debugger as shown below.
    add debugging configuration
  3. Enter the details to create a new configuration as shown in the example below. You need to define two port numbers and a hostname to connect the EI server ESB profile with the WSO2 EI Tooling Plugin in the mediation debug mode.
    new configuration
  4. Execute the following command commands to start WSO2 EI server in the debug mode by passing a system variable at start up:    sh wso2server.sh  
    • On Windows: <EI_HOME>\bin\integrator.bat --run -Desb.debug=true
    • On Linux/Solaris: sh <EI_HOME>/bin/integrator.sh -Desb.debug=true
  5. Click Debug in the WSO2 EI Tooling Plugin when  the WSO2 EI Console indicates the following.

    Note

    You have approximately a one-minute time span to connect the WSO2 EI Tooling Plugin with the EI server for the execution of the above created debug configuration. Otherwise, the EI server will stop listening and start without connecting with the debugger tool.

    Console of ESB

  6.   In the WSO2 EI Tooling Plugin, right click and add breakpoints or skip points on the desired mediators to start debugging as shown in the example below. 

    add breakpoints

     


    Info

    You can add the following debugging options on the mediators using the right click context menu.

    • Toggle Breakpoint: Adds a breakpoint to the selected mediator
    • Toggle Skip Point: Adds a skip point to the selected mediator
    • Resend EI Debug Points: If you re-start the the EI serverESB profile, or if you re-deploy the proxy service after changing its Synapse configuration, you need to re-send the information on breakpoints to the WSO2 EI server. This re-sends all registered debugging points to the EI Server.   
    • Delete All EI Debug Points: Deletes all registered debug points from the EI Server and the WSO2 EI Tooling Plugin

...

Follow the steps below to inject new properties to the EI server ESB profile while debugging.

  1. Right click on the Variable view, click Inject/Clear Property, and then click Inject Property as shown below.
    inject property menu
  2. Enter the details about the property you prefer to add as shown in the example below.
    enter new property details
  3. Click OK.

...

Follow the steps below to clear an existing property from the the EI serverESB profile.

  1. Right click on the Variable view, click Inject/Clear Property, and then click Clear Property as shown below.
    inject property menu
  2. Enter the details about the property you want to clear as shown in the example below.
    clearing a property
  3. Click OK.

...

Click on the value section of the preferred property and change the value in the Variable view as shown in the example below, to modify it.

modifying the value of a property

Viewing wire logs

You can view wire logs at the entry point of WSO2 EI, while While debugging a Synapse flow, you can view the the actual HTTP messages at the entry point of the ESB profile via wire logs. For example, you  you can view wire logs of the incoming flow and the final response of a proxy service.  AlsoAlso, you can view wire logs for points, where it goes out from the EIESB profile. For example, you can see the outgoing and incoming wire logs for specific mediators (i.e. Call mediator, Send mediator etc.). Wire logs are useful to troubleshoot unexpected issues, which occurr while integrating miscallaneous systems. You can use wire logs to verify whether the message payload is properly going out from the server, whether the HTTP headers such as the content-type is properly set in the outgoing message etc. 


Note
It is recommended to enable wire logs only for troubleshooting purposes. Running productions systems with wire logs enabled is not recommended.


Enabling wire logs

The passthrough HTTP transport is the main transport, which handles HTTP/HTTPS messages in WSO2 EI. Un-comment the following entry in the <EI_HOME/conf/log4j.properties file to enable wire logs for the passthrough HTTP transport: log4j.logger.org.apache.synapse.transport.http.wire=DEBUG

Info
Callout mediator uses the Axis2 CommonsHTTPSender to invoke services. It does not leverage the non-blocking NHTTP/passthrough transports. Therefore, you need to add the following entries to the <EI_HOME/conf/log4j.properties file to enable wire logs for the callout mediator.


Code Block
languagetext
log4j.logger.httpclient.wire.header=DEBUG
log4j.logger.httpclient.wire.content=DEBUG

Following is a sample wirelog.

Code Block
languagetext
[2013-09-22 19:47:57,797] DEBUG - wire >> "POST /services/StockQuoteProxy HTTP/1.1[\r][\n]"
[2013-09-22 19:47:57,798] DEBUG - wire >> "Content-Type: text/xml; charset=UTF-8[\r][\n]"
[2013-09-22 19:47:57,798] DEBUG - wire >> "SOAPAction: "urn:getQuote"[\r][\n]"
[2013-09-22 19:47:57,799] DEBUG - wire >> "User-Agent: Axis2[\r][\n]"
[2013-09-22 19:47:57,799] DEBUG - wire >> "Host: localhost:8280[\r][\n]"
[2013-09-22 19:47:57,799] DEBUG - wire >> "Transfer-Encoding: chunked[\r][\n]"
[2013-09-22 19:47:57,800] DEBUG - wire >> "[\r][\n]"
[2013-09-22 19:47:57,800] DEBUG - wire >> "215[\r][\n]"
[2013-09-22 19:47:57,800] DEBUG - wire >> "http://localhost:8280/services/StockQuoteProxyurn:uuid:9e1b0def-a24b-4fa2-8016-86cf3b458f67urn:getQuoteIBM[\r][\n]"
[2013-09-22 19:47:57,801] DEBUG - wire >> "0[\r][\n]"
[2013-09-22 19:47:57,801] DEBUG - wire >> "[\r][\n]"
[2013-09-22 19:47:57,846]  INFO - TimeoutHandler This engine will expire all callbacks after : 120 seconds, irrespective of the timeout action, after the specified or optional timeout
[2013-09-22 19:47:57,867] DEBUG - wire << "POST /services/SimpleStockQuoteService HTTP/1.1[\r][\n]"
[2013-09-22 19:47:57,867] DEBUG - wire << "Content-Type: text/xml; charset=UTF-8[\r][\n]"
[2013-09-22 19:47:57,867] DEBUG - wire << "SOAPAction: "urn:getQuote"[\r][\n]"
[2013-09-22 19:47:57,867] DEBUG - wire << "Transfer-Encoding: chunked[\r][\n]"
[2013-09-22 19:47:57,868] DEBUG - wire << "Host: localhost:9000[\r][\n]"
[2013-09-22 19:47:57,868] DEBUG - wire << "Connection: Keep-Alive[\r][\n]"
[2013-09-22 19:47:57,868] DEBUG - wire << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"
[2013-09-22 19:47:57,868] DEBUG - wire << "[\r][\n]"
[2013-09-22 19:47:57,868] DEBUG - wire << "215[\r][\n]"
[2013-09-22 19:47:57,868] DEBUG - wire << "http://localhost:8280/services/StockQuoteProxyurn:uuid:9e1b0def-a24b-4fa2-8016-86cf3b458f67urn:getQuoteIBM[\r][\n]"
[2013-09-22 19:47:57,868] DEBUG - wire << "0[\r][\n]"
[2013-09-22 19:47:57,869] DEBUG - wire << "[\r][\n]"
[2013-09-22 19:47:58,002] DEBUG - wire >> "HTTP/1.1 200 OK[\r][\n]"
[2013-09-22 19:47:58,002] DEBUG - wire >> "Content-Type: text/xml; charset=UTF-8[\r][\n]"
[2013-09-22 19:47:58,002] DEBUG - wire >> "Date: Sun, 22 Sep 2013 14:17:57 GMT[\r][\n]"
[2013-09-22 19:47:58,002] DEBUG - wire >> "Transfer-Encoding: chunked[\r][\n]"
[2013-09-22 19:47:58,002] DEBUG - wire >> "Connection: Keep-Alive[\r][\n]"
[2013-09-22 19:47:58,002] DEBUG - wire >> "[\r][\n]"
[2013-09-22 19:47:58,014] DEBUG - wire << "HTTP/1.1 200 OK[\r][\n]"
[2013-09-22 19:47:58,015] DEBUG - wire << "Content-Type: text/xml; charset=UTF-8[\r][\n]"
[2013-09-22 19:47:58,015] DEBUG - wire << "Date: Sun, 22 Sep 2013 14:17:58 GMT[\r][\n]"
[2013-09-22 19:47:58,015] DEBUG - wire << "Server: WSO2-PassThrough-HTTP[\r][\n]"
[2013-09-22 19:47:58,016] DEBUG - wire << "Transfer-Encoding: chunked[\r][\n]"
[2013-09-22 19:47:58,016] DEBUG - wire << "[\r][\n]"
[2013-09-22 19:47:58,016] DEBUG - wire >> "4d8[\r][\n]"
[2013-09-22 19:47:58,017] DEBUG - wire >> "urn:getQuoteResponseurn:uuid:9e1b0def-a24b-4fa2-8016-86cf3b458f673.827143922330303-8.819296796724336-170.50810412063595170.73218944560944Sun Sep 22 19:47:57 IST 2013-170.472077024782785.562077973231586E7IBM Company178.0616712932281324.9438904049222641.9564266653777567195.61908401976004IBM6216[\r][\n]"
[2013-09-22 19:47:58,017] DEBUG - wire >> "0[\r][\n]"
[2013-09-22 19:47:58,018] DEBUG - wire >> "[\r][\n]"
[2013-09-22 19:47:58,021] DEBUG - wire << "4d8[\r][\n]"
[2013-09-22 19:47:58,022] DEBUG - wire << "urn:getQuoteResponseurn:uuid:9e1b0def-a24b-4fa2-8016-86cf3b458f673.827143922330303-8.819296796724336-170.50810412063595170.73218944560944Sun Sep 22 19:47:57 IST 2013-170.472077024782785.562077973231586E7IBM Company178.0616712932281324.9438904049222641.9564266653777567195.61908401976004IBM6216[\r][\n]"
[2013-09-22 19:47:58,022] DEBUG - wire << "0[\r][\n]"
[2013-09-22 19:47:58,022] DEBUG - wire << "[\r][\n]
 There are two incoming messages and two outgoing messages in the above log. First part of the wire logs of a message contains the HTTP headers and it is followed by the message payload. You need to identify the message direction as shown below to read wire logs.
  • DEBUG - wire >>    - This represents a message, which is coming into WSO2 EI from the wire
  • DEBUG - wire <<    - This represents a message, which goes to the wire from WSO2 EI

Viewing wire logs of a specific mediator

...