Sample 258: Switching from HTTP to FIX
<definitions xmlns="http://ws.apache.org/ns/synapse">
<proxy name="FIXProxy" transports="http">
<target>
<endpoint>
<address
uri="fix://localhost:19876?BeginString=FIX.4.0&SenderCompID=SYNAPSE&TargetCompID=EXEC"/>
</endpoint>
<inSequence>
<property name="transport.fix.ServiceName" value="FIXProxy" scope="axis2-client"/>
<log level="full"/>
</inSequence>
<outSequence>
<log level="full"/>
<send/>
</outSequence>
</target>
<parameter name="transport.fix.InitiatorConfigURL">
file:repository/conf/sample/resources/fix/synapse-sender.cfg
</parameter>
<parameter name="transport.fix.InitiatorMessageStore">file</parameter>
<parameter name="transport.fix.SendAllToInSequence">false</parameter>
<parameter name="transport.fix.DropExtraResponses">true</parameter>
</proxy>
</definitions>
Objective
Demonstrates how to use the FIX transport in a transport switching scenario with
HTTP.
Executing the Client
Go to the samples/axis2Client directory and invoke the sample FIX/HTTP client as
follows.
ant fixclient -Dsymbol=IBM -Dqty=5 -Dmode=buy -Daddurl=http://localhost:8280/services/FIXProxy
This command sends a HTTP request to the FIXProxy on Synapse. The message is
converted into a FIX message and sent to the Executor sample application. Executor
will send two responses for this request (receive ack and the execution report) and
Synapse will send the first response back to the HTTP client. (Synapse can't send
both responses back, since HTTP does not allow sending two responses to the same
request)
Back to Catalog