## Apache Synapse

## Sample 854: Introduction to Synapse Wire Tap eip function template

<!-- Introduction to Synapse Wire Tap eip function template --> <definitions xmlns="http://ws.apache.org/ns/synapse"> <import xmlns="http://ws.apache.org/ns/synapse" name="EipLibrary" package="synapse.lang.eip" /> <sequence name="main"> <property name="OUT_ONLY" value="true"/> <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/> <call-template target="synapse.lang.eip.wire_tap"> <with-param name="wiretap_uri" value="http://localhost:9000/services/SimpleStockQuoteService"/> <with-param name="destination_uri" value="http://localhost:9001/services/SimpleStockQuoteService"/> </call-template> </sequence> </definitions>

### Objective

This sample is an introduction to Synapse Wire Tap eip function template.

### Pre-requisites

- Start two instances of sample Axis2 server on HTTP ports 9000,9001. And deploy the SimpleStockQuoteService in all of them.
- Start Synapse using the configuration numbered 854 (repository/conf/sample/synapse_sample_854.xml)
  Unix/Linux: sh synapse.sh -sample 854
  Windows: synapse.bat -sample 854

### Executing the Client

In this sample, the messages sent to Synapse will be route to a secondary channel(wiretap_uri) while they are being forwarded to the main channel(destination_uri).

Invoke the client as follows.

ant stockquote -Dtrpurl=http://localhost:8280/

Back to Catalog