Introduction to Synapse - Shows how Synape can be configured to log and pass messages through.
Execute the client in the smart client mode using the following command.
By tracing the execution of Synapse with the log output level set to DEBUG, you will see that the client request is arriving at Synapse with a WS-Addressing 'To' header set to EPR http://localhost:9000/services/SimpleStockQuoteService. The Synapse engine logs the message at the 'full' log level (i.e. all the message headers and the body) and then sends it to its explicit 'To' address which is http://localhost:9000/services/SimpleStockQuoteService. You will see a log entry in the Axis2 server console confirming that the message got routed to the sample server and the service hosted at the server generated a stock quote for the requested symbol.
The response message generated by the service is received by Synapse, and flows through the same mediation rules, which log the response and send back to the client. On the client console you should see an output similar to the following based on the message received by the client.
Execute the sample Axis2 client as follows to run it in the proxy mode.
You will see the exact same behaviour as per the previous example when you run this scenario. However this time the client sends the message to the Axis2 server using Synapse as a HTTP proxy.
The Axis2 client supports another mode of operation known as the 'dumb client mode'. This will be addressed in sample 1.