After more tracing and analysis I think I understand what is happening but I
still need a little help.

My synapse.xml configuration includes an inline task whose purpose is to
periodically poll the WS for market data messages.  When such a message
comes in it is received as an "asynchronous response message" and is passed
to the Main Sequence.  My problem is how to get it passed to the FIX
session--either directly through the proxy or indirectly through the Main
sequence.

Is there a different way to structure the task definition so Synapse knows
to route the response to the FIX proxy?  (I saw a couple of Nabble messages
about a 'ProxyInjector' mediator but I don't know if that is the answer to
this problem (if it exists).)

Here's the task definition:
    <task class="org.apache.synapse.startup.tasks.MessageInjector"
name="GetMarketMessages">
        <property name="to" value="http://localhost:2001/api/v1"/>
        <property name="format" value="soap11"/>
        <property name="soapAction" value=""/>
        <property name="message">
            <GetMarketMessages xmlns="http://www.harts.com/cfl"; />
        </property>
        <trigger interval="10"/>
    </task>

Here's the log output:
2009-07-13 14:52:25,409 [-] [HttpClientWorker-15] DEBUG
SynapseCallbackReceiver Synapse received an asynchronous response message
2009-07-13 14:52:25,539 [-] [HttpClientWorker-15] DEBUG
SynapseCallbackReceiver Received To: null
2009-07-13 14:52:25,609 [-] [HttpClientWorker-15] DEBUG
SynapseCallbackReceiver SOAPAction: 
2009-07-13 14:52:25,609 [-] [HttpClientWorker-15] DEBUG
SynapseCallbackReceiver WSA-Action: 
2009-07-13 14:52:25,689 [-] [HttpClientWorker-15] DEBUG
SynapseCallbackReceiver Body : 
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";><soapenv:Body>
  <cfl:GetMarketMessagesResponse xmlns:cfl="http://www.harts.com/cfl";>
   <cfl:GetMarketMessagesResponseData
sessionID="A29A1D4D85AEF15F46D3229414619591" />
  </cfl:GetMarketMessagesResponse>
 </soapenv:Body></soapenv:Envelope>
2009-07-13 14:52:25,860 [-] [HttpClientWorker-15] DEBUG
Axis2SynapseEnvironment Injecting MessageContext
2009-07-13 14:52:25,860 [-] [HttpClientWorker-15] DEBUG
Axis2SynapseEnvironment Using Main Sequence for injected message
2009-07-13 14:52:25,920 [-] [HttpClientWorker-15] DEBUG SequenceMediator
Start : Sequence <main>
2009-07-13 14:52:25,950 [-] [HttpClientWorker-15] DEBUG SequenceMediator
Sequence <SequenceMediator> :: mediate()
2009-07-13 14:52:26,050 [-] [HttpClientWorker-15] DEBUG InMediator Start :
In mediator
2009-07-13 14:52:26,050 [-] [HttpClientWorker-15] DEBUG InMediator Current
message is a response - skipping child mediators
2009-07-13 14:52:26,080 [-] [HttpClientWorker-15] DEBUG InMediator End : In
mediator
2009-07-13 14:52:26,080 [-] [HttpClientWorker-15] DEBUG OutMediator Start :
Out mediator
2009-07-13 14:52:26,140 [-] [HttpClientWorker-15] DEBUG OutMediator Current
message is outgoing - executing child mediators
2009-07-13 14:52:26,170 [-] [HttpClientWorker-15] DEBUG OutMediator Sequence
<OutMediator> :: mediate()
2009-07-13 14:52:26,170 [-] [HttpClientWorker-15] DEBUG FilterMediator Start
: Filter mediator
2009-07-13 14:52:26,280 [-] [HttpClientWorker-15] DEBUG FilterMediator XPath
expression : boolean(//cfl:LoginResponse/cfl:LoginResponseData/@sessionID)
evaluates to false and no else path - skipping child mediators
2009-07-13 14:52:26,350 [-] [HttpClientWorker-15] DEBUG FilterMediator End :
Filter mediator 
2009-07-13 14:52:26,451 [-] [HttpClientWorker-15] DEBUG FilterMediator Start
: Filter mediator
2009-07-13 14:52:26,481 [-] [HttpClientWorker-15] DEBUG FilterMediator XPath
expression : boolean(//cfl:GetMarketMessagesResponseData) evaluates to true
- executing child mediators
2009-07-13 14:52:26,531 [-] [HttpClientWorker-15] DEBUG FilterMediator
Sequence <FilterMediator> :: mediate()
.
.
.
2009-07-13 14:52:26,851 [-] [HttpClientWorker-15] DEBUG FilterMediator End :
Filter mediator 
2009-07-13 14:52:26,851 [-] [HttpClientWorker-15] DEBUG OutMediator End :
Out mediator
2009-07-13 14:52:26,931 [-] [HttpClientWorker-15] DEBUG SequenceMediator End
: Sequence <main>

Appreciate any help...
Thanks,
Bill


Hiranya Jayathilaka-3 wrote:
> 
> Hi Bill,
> 
> On Thu, Jul 16, 2009 at 2:40 AM, PrgTrdr <[email protected]> wrote:
> 
>>
>> I have cloned Sample 259 to implement a use case where a FIX client
>> communicates with a Web Service.  The system is working well as far as 1)
>> establishing the FIX session from the client to Synapse, 2) Logon,
>> 3)Sending
>> a New Order message, 4)performing an XSLT to create a WS request,
>> 5)sending
>> the Request to the WS, 6)receiving back a Response from the WS,
>> 7)performing
>> an XSLT to convert the SOAP response to an XML-encapsulated FIX message.
>> But then the response message never flows back to the FIX transport (I
>> can
>> tell by examining the QuickFIX/J logs).
>>
>> I am receiving (and converting) the WS Response message in a standard
>> "<out>" sequence.  At the end I placed
>>
>> <send>
>>    <endpoint key="FIXProxy"/>
>> </send>
>>
>> to see if that would make it work, but the message doesn't go out to FIX,
>> nor does it show up in the FIXProxy <outSequence> (I put some log
>> mediators
>> in there to trace activity).
>>
>> Sample 259 is one-way only (FIX->SOAP).  Can someone give me an idea
>> about
>> what needs to be done to make this two-way?  Perhaps changes to the
>> FIXProxy
>> configuration?
> 
> 
> How about placing an empty <send/> element in the <outSequence> of your
> proxy service? I think that should do the trick. Anyway  please send in
> your
> full Synapse configuration for us to get a clear idea of the scenario.
> 
> Thanks,
> Hiranya
> 
> 
>>
>> Thanks,
>> Bill
>> --
>> View this message in context:
>> http://www.nabble.com/HTTP--%3E-FIX-Response-Handling-tp24505424p24505424.html
>> Sent from the Synapse - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Hiranya Jayathilaka
> Software Engineer;
> WSO2 Inc.;  http://wso2.org
> E-mail: [email protected];  Mobile: +94 77 633 3491
> Blog: http://techfeast-hiranya.blogspot.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/HTTP--%3E-FIX-Response-Handling-tp24505424p24515672.html
Sent from the Synapse - User mailing list archive at Nabble.com.

Reply via email to