You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by PrgTrdr <pr...@gmail.com> on 2009/07/15 23:10:35 UTC

HTTP -> FIX Response Handling

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?

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.


More DEBUG output Re: HTTP -> FIX Response Handling

Posted by PrgTrdr <pr...@gmail.com>.
Here is the synapse.log output with DEBUG level tracing when it gets to the
<send> mediator:

2009-07-16 10:25:38,255 [-] [SynapseWorker-1] DEBUG SendMediator Start :
Send mediator
2009-07-16 10:25:38,255 [-] [SynapseWorker-1] DEBUG EndpointContext Checking
if endpoint : AnonymousEndpoint currently at state ACTIVE can be used now?
2009-07-16 10:25:38,255 [-] [SynapseWorker-1] DEBUG AddressEndpoint Sending
message through endpoint : null resolving to address =
fix://localhost:9876?BeginString=FIX.4.2&SenderCompID=OPTMED&TargetCompID=BROKER
2009-07-16 10:25:38,255 [-] [SynapseWorker-1] DEBUG AddressEndpoint
SOAPAction: 
2009-07-16 10:25:38,255 [-] [SynapseWorker-1] DEBUG AddressEndpoint
WSA-Action: 
2009-07-16 10:25:38,255 [-] [SynapseWorker-1] DEBUG Axis2FlexibleMEPClient
Sending [add = false] [sec = false] [rm = false] [mtom = false] [swa =
false] [format = null] [force soap11=false] [force soap12=false] [pox=false]
[get=false] [encoding=null] [to Address:
http://www.w3.org/2005/08/addressing/anonymous]
2009-07-16 10:25:38,255 [-] [SynapseWorker-1] DEBUG Axis2FlexibleMEPClient
Message [Original Request Message ID :
urn:uuid:920AD729A39F5B343582610572454048-351516953] [New Cloned Request
Message ID : urn:uuid:920AD729A39F5B343582624861297747737116756]
2009-07-16 10:25:38,255 [-] [SynapseWorker-1] DEBUG SynapseCallbackReceiver
Callback added. Total callbacks waiting for : 1
2009-07-16 10:25:38,255 [-] [SynapseWorker-1] DEBUG FIXTransportSender
Attempting to send a FIX message, Message
ID:urn:uuid:920AD729A39F5B343582624861297747737116756
2009-07-16 10:25:38,375 [-] [SynapseWorker-1] ERROR Axis2Sender Unexpected
error during sending message out
org.apache.axis2.AxisFault: Unable to find a valid service for the message
	at
org.apache.synapse.transport.fix.FIXUtils.getServiceName(FIXUtils.java:655)
	at
org.apache.synapse.transport.fix.FIXTransportSender.sendMessage(FIXTransportSender.java:103)
	at
org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
	at
org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:190)
	at
org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:174)
	at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
	at
org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:343)
	at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:56)
	at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:176)
	at
org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:194)
	at
org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59)
	at
org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:75)
	at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
	at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
	at org.apache.synapse.mediators.MediatorWorker.run(MediatorWorker.java:69)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
	at java.lang.Thread.run(Thread.java:595)
2009-07-16 10:25:39,597 [-] [SynapseWorker-1]  WARN MediatorWorker Executing
fault handler due to exception encountered



PrgTrdr wrote:
> 
> Thanks Hiranya,
> 
> I believe you are offering the correct solution, however I'm still not
> getting it right.  (FYI, I am using a snapshot that is about 1 month old.)
> 
> 1.  At your suggestion, I inserted the following <send> mediator in my
> <out> sequence.
>               <send>
>                 <endpoint>
>                   <address
> uri="fix://localhost:9876?BeginString=FIX.4.2&amp;amp;SenderCompID=OPTMED&amp;amp;TargetCompID=BROKER"/>
>                 </endpoint>
>               </send>
> 
> 2.  When it reaches this point, Synapse gives the exception, "Unable to
> find a valid service for the message".  Here is the log output:
> 2009-07-16 09:37:51,343 [-] [SynapseWorker-2]  INFO LogMediator To:
> http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: ,
> MessageID: urn:uuid:5191E37439E3958F4479756836588468614536389, Direction:
> response, Envelope: <?xml version='1.0'
> encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
>   <message xmlns:cfl="http://www.harts.com/cfl"
> xmlns:fn="http://www.w3.org/2005/02/xpath-functions" counter="1"
> inSession="FIX.4.2:OPTMED->BROKER">
> <header>
> <field id="8">FIX.4.2</field>
> <field id="35">8</field>
> <field id="49">OPTMED</field>
> <field id="52">20090716-08:37:30.030</field>
> <field id="56">BROKER</field>
> </header>
> <body>
> <field id="37" />
> <field id="11" />
> <field id="38">1000</field>
> <field id="40">2</field>
> <field id="54">1</field>
> <field id="55" />
> <field id="59">3</field>
> <field id="60">20090716-08:37:30.030</field>
> </body>
> </message>
>  </soapenv:Body></soapenv:Envelope>
> 2009-07-16 09:37:51,413 [-] [SynapseWorker-2] ERROR Axis2Sender Unexpected
> error during sending message out
> org.apache.axis2.AxisFault: Unable to find a valid service for the message
> 	at
> org.apache.synapse.transport.fix.FIXUtils.getServiceName(FIXUtils.java:655)
> 	at
> org.apache.synapse.transport.fix.FIXTransportSender.sendMessage(FIXTransportSender.java:103)
> 	at
> org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
> 	at
> org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:190)
> 	at
> org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:174)
> 	at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
> 	at
> org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:343)
> 	at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:56)
> 	at
> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:176)
> 	at
> org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:194)
> 	at
> org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59)
> 	at
> org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:75)
> 	at
> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
> 	at
> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
> 	at
> org.apache.synapse.mediators.MediatorWorker.run(MediatorWorker.java:69)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
> 	at java.lang.Thread.run(Thread.java:595)
> 2009-07-16 09:37:51,423 [-] [SynapseWorker-2]  WARN EndpointContext
> Endpoint : AnonymousEndpoint will be marked SUSPENDED as it failed
> 
> 3.  Here is the FIXProxy definition (very similar to Sample 259):
>     <endpoint name="test-system" >    <!-- Must use TCPMon as proxy -->
>         <address uri="http://localhost:2001/api/v1" format="soap11" />
>     </endpoint>
> 
>     <proxy name="FIXProxy" transports="fix">
>       <target endpoint="test-system" >
>         <inSequence>
>           <log level="full" />
> .
> .
> .
>           <!-- Translate the message -->
>           <xslt key="xslt-key-req" />
>           <log level="full" /> 
> 
>       </inSequence>
> 
>       <outSequence>
>         <log level="full" />
> 
>         <sequence key="HandleResponse1" />
>         <sequence key="HandleResponse2" />
>         
>         <log level="full" />
>         <send />
> 
>       </outSequence>
>     </target>
>       
>     <parameter
> name="transport.fix.AcceptorConfigURL">file:repository/conf/OptMed/resources/fix/FIX-OptMed.cfg</parameter>
>     <parameter name="transport.fix.AcceptorMessageStore">file</parameter>
>     <parameter name="transport.fix.AcceptorLogFactory">file</parameter>
>   </proxy>
> 
> 4.  Here is the FIX configuration file FIX-OptMed.cfg referenced in the
> FIXProxy definition (very similar to default Sample setup):
> [default]
> FileStorePath=logs/fix/OptMed
> FileLogPath=logs/fix/OptMed
> ConnectionType=acceptor
> StartTime=00:00:00
> EndTime=00:00:00
> HeartBtInt=30
> ValidOrderTypes=1,2,F
> SenderCompID=OPTMED
> TargetCompID=BROKER
> UseDataDictionary=Y
> DefaultMarketPrice=12.30
> ResetOnLogon=Y
> ResetOnDisconnect=Y
> 
> [session]
> BeginString=FIX.4.2
> SocketAcceptPort=9876
> DataDictionary=C:\Apache\Synapse-Snapshot\repository\conf\OptMed\resources\fix\DD-OptMed42.xml
> 
> Thanks again for your help.
> Bill
> 
> 
> Hiranya Jayathilaka-3 wrote:
>> 
>> Hi Bill,
>> 
>> On Thu, Jul 16, 2009 at 6:17 PM, PrgTrdr <pr...@gmail.com> wrote:
>> 
>>>
>>> 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.
>> 
>> 
>> I believe what you want to do is to pass the market data messages coming
>> from the WS to the FIX acceptor session on which your proxy service is
>> listening on. Is that correct? In that case you could address the FIX
>> session by giving it an EPR and then use the send mediator to forward
>> messages to the FIX session. For an example let's say your FIX session
>> has
>> following parameters.
>> 
>> BeginString=FIX.4.4
>> SenderCompID=SYNAPSE
>> TargetCompID=MyComp
>> 
>> Then we can use the following EPR to address the FIX session:
>> 
>> fix://localhost:9876?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=MyComp
>> 
>> 
>> Replace the port number (9876) with the actual port number on which your
>> FIX
>> proxy service is listening on. Now in the main sequence you can use the
>> send
>> mediator as follows to forward messages to the FIX session.
>> 
>> <send>
>>   <endpoint>
>>       <address
>> uri="fix://localhost:9876?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=MyComp
>> "/>
>>   </endpoint>
>> </send>
>> 
>> Does this achive your goal?
>> 
>> Also please note that the initial FIX transport implementation did not
>> support scenarios as complex as this. The enhancements required to run
>> this
>> scenario was done very recently and hence this will work only on Synapse
>> snapshot builds until we get the next release out. On earlier releases
>> you
>> will get an NPE if you try to do this.
>> 
>> Thanks,
>> Hiranya
>> 
>> 
>> 
>>>
>>> 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 <pr...@gmail.com> 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: hiranya@wso2.com;  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.
>>>
>>>
>> 
>> 
>> -- 
>> Hiranya Jayathilaka
>> Software Engineer;
>> WSO2 Inc.;  http://wso2.org
>> E-mail: hiranya@wso2.com;  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-tp24505424p24517652.html
Sent from the Synapse - User mailing list archive at Nabble.com.


Re: HTTP -> FIX Response Handling

Posted by PrgTrdr <pr...@gmail.com>.
Thanks for clarifying. FYI you get the excepton whether you enable the Fix
transport in Axis2.XML or not. 

I didn't build from source I just took the bin package. 

Bill

Hiranya Jayathilaka-3 wrote:
> 
> Hi Bill,
> 
> According to the information provided the root exception is:
> 
> java.lang.ClassNotFoundException:
> org.apache.synapse.transport.fix.FIXTransportSender
> 
> You need to have the synapse-fix-transport.jar in SYNAPSE_HOME/lib
> directory
> for you to be able to start Synapse with the FIX transport enabled. If you
> built Synapse from source then you can find this jar in
> SYNAPSE_SOURCE_HOME/modules/transports/optional/fix/target directory.
> Since
> the FIX transport is optional it does not go into the final distribution
> archive by default. You need to manually copy it into the classpath.
> 
> Thanks,
> Hiranya
> 
> On Fri, Jul 17, 2009 at 4:36 PM, PrgTrdr <pr...@gmail.com> wrote:
> 
>>
>> Hiranya, Asanka,
>>
>> I got last night's build and am not able to start Synapse (even with
>> default
>> synapse.xml).  Here's the log output:
>>
>> 2009-07-17 06:45:10,388 [-] [WrapperSimpleAppMain]  INFO SynapseServer
>> Starting Apache Synapse...
>> 2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
>> SynapseControllerFactory Using Synapse home : C:\Apache\SYNAPS~4\.
>> 2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
>> SynapseControllerFactory Using Axis2 repository :
>> C:\Apache\SYNAPS~4\reposi
>> tory
>> 2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
>> SynapseControllerFactory Using axis2.xml location :
>> C:\Apache\SYNAPS~4\repo
>> sitory\conf\axis2.xml
>> 2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
>> SynapseControllerFactory Using synapse.xml location :
>> C:\Apache\SYNAPS~4\bi
>> n\..\repository\conf\synapse.xml
>> 2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
>> SynapseControllerFactory Using server name : localhost
>> 2009-07-17 06:45:10,548 [-] [WrapperSimpleAppMain]  INFO
>> SynapseControllerFactory The timeout handler will run every : 15s
>> 2009-07-17 06:45:10,668 [-] [WrapperSimpleAppMain]  INFO
>> Axis2SynapseController Initializing Synapse at : Fri Jul 17 06:45:10 EDT
>> 20
>> 09
>> 2009-07-17 06:45:11,209 [-] [WrapperSimpleAppMain] FATAL
>> Axis2SynapseController Failed to create a new Axis2 instance...
>> org.apache.axis2.deployment.DeploymentException:
>> org.apache.synapse.transport.fix.FIXTransportSender
>>         at
>>
>> org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:694)
>>        at
>>
>> org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:121)
>>        at
>>
>> org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:707)
>>        at
>>
>> org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
>>        at
>>
>> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
>>        at
>>
>> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory
>> .java:206)
>>        at
>>
>> org.apache.synapse.Axis2SynapseController.createNewInstance(Axis2SynapseController.java:494)
>>        at
>>
>> org.apache.synapse.Axis2SynapseController.init(Axis2SynapseController.java:116)
>>        at org.apache.synapse.ServerManager.doInit(ServerManager.java:419)
>>        at org.apache.synapse.ServerManager.init(ServerManager.java:108)
>>        at org.apache.synapse.SynapseServer.main(SynapseServer.java:62)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>        at
>> org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
>>         at java.lang.Thread.run(Thread.java:595)
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.synapse.transport.fix.FIXTransportSender
>>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>        at java.security.AccessController.doPrivileged(Native Method)
>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>        at java.lang.Class.forName0(Native Method)
>>        at java.lang.Class.forName(Class.java:164)
>>        at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
>>        at
>>
>> org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:669)
>>        ... 16 more
>>
>> WrapperSimpleApp: Encountered an error running main:
>> org.apache.synapse.SynapseException: Failed to create a new Axis2
>> instance...
>> org.apache.synapse.SynapseException: Failed to create a new Axis2
>> instance...
>>        at
>>
>> org.apache.synapse.Axis2SynapseController.handleFatal(Axis2SynapseController.java:786)
>>        at
>>
>> org.apache.synapse.Axis2SynapseController.createNewInstance(Axis2SynapseController.java:517)
>>        at
>>
>> org.apache.synapse.Axis2SynapseController.init(Axis2SynapseController.java:116)
>>        at org.apache.synapse.ServerManager.doInit(ServerManager.java:419)
>>        at org.apache.synapse.ServerManager.init(ServerManager.java:108)
>>        at org.apache.synapse.SynapseServer.main(SynapseServer.java:62)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>        at
>> org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
>>         at java.lang.Thread.run(Thread.java:595)
>> Caused by: org.apache.axis2.deployment.DeploymentException:
>> org.apache.synapse.transport.fix.FIXTransportSender
>>         at
>>
>> org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:694)
>>        at
>>
>> org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:121)
>>        at
>>
>> org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:707)
>>        at
>>
>> org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
>>        at
>>
>> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
>>        at
>>
>> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory
>> .java:206)
>>        at
>>
>> org.apache.synapse.Axis2SynapseController.createNewInstance(Axis2SynapseController.java:494)
>>        ... 10 more
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.synapse.transport.fix.FIXTransportSender
>>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>        at java.security.AccessController.doPrivileged(Native Method)
>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>        at java.lang.Class.forName0(Native Method)
>>        at java.lang.Class.forName(Class.java:164)
>>        at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
>>        at
>>
>> org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:669)
>>        ... 16 more
>> <-- Wrapper Stopped
>>
>> I'm not sure if this has anything to do with the FIX jars but I'm using
>> the
>> same ones that I did with my older build.
>>
>> Thanks,
>> Bill
>>
>> PrgTrdr wrote:
>> >
>> > Thanks Asanka, I will get the latest build tonight.
>> > Bill
>> >
>> > asankaa wrote:
>> >>
>> >> Hi Bill,
>> >> Yes, you are getting the NPE because the build you are using does not
>> >> have the change that Hiranya mentioned earlier. We did that change
>> >> couple of weeks back so please take a update of the source and create
>> a
>> >> new build.
>> >> - Asanka
>> >>
>> >> PrgTrdr wrote:
>> >>> Do you think this is because I'm using Synapse-TRUNK from about a
>> month
>> >>> ago?
>> >>> Or should this functionality be in that version?
>> >>>
>> >>> Thanks,
>> >>> Bill
>> >>>
>> >>>
>> >>>
>> >>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/HTTP--%3E-FIX-Response-Handling-tp24505424p24532506.html
>> Sent from the Synapse - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Hiranya Jayathilaka
> Software Engineer;
> WSO2 Inc.;  http://wso2.org
> E-mail: hiranya@wso2.com;  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-tp24505424p24533667.html
Sent from the Synapse - User mailing list archive at Nabble.com.


Re: HTTP -> FIX Response Handling

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Bill,

According to the information provided the root exception is:

java.lang.ClassNotFoundException:
org.apache.synapse.transport.fix.FIXTransportSender

You need to have the synapse-fix-transport.jar in SYNAPSE_HOME/lib directory
for you to be able to start Synapse with the FIX transport enabled. If you
built Synapse from source then you can find this jar in
SYNAPSE_SOURCE_HOME/modules/transports/optional/fix/target directory. Since
the FIX transport is optional it does not go into the final distribution
archive by default. You need to manually copy it into the classpath.

Thanks,
Hiranya

On Fri, Jul 17, 2009 at 4:36 PM, PrgTrdr <pr...@gmail.com> wrote:

>
> Hiranya, Asanka,
>
> I got last night's build and am not able to start Synapse (even with
> default
> synapse.xml).  Here's the log output:
>
> 2009-07-17 06:45:10,388 [-] [WrapperSimpleAppMain]  INFO SynapseServer
> Starting Apache Synapse...
> 2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
> SynapseControllerFactory Using Synapse home : C:\Apache\SYNAPS~4\.
> 2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
> SynapseControllerFactory Using Axis2 repository : C:\Apache\SYNAPS~4\reposi
> tory
> 2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
> SynapseControllerFactory Using axis2.xml location : C:\Apache\SYNAPS~4\repo
> sitory\conf\axis2.xml
> 2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
> SynapseControllerFactory Using synapse.xml location : C:\Apache\SYNAPS~4\bi
> n\..\repository\conf\synapse.xml
> 2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
> SynapseControllerFactory Using server name : localhost
> 2009-07-17 06:45:10,548 [-] [WrapperSimpleAppMain]  INFO
> SynapseControllerFactory The timeout handler will run every : 15s
> 2009-07-17 06:45:10,668 [-] [WrapperSimpleAppMain]  INFO
> Axis2SynapseController Initializing Synapse at : Fri Jul 17 06:45:10 EDT 20
> 09
> 2009-07-17 06:45:11,209 [-] [WrapperSimpleAppMain] FATAL
> Axis2SynapseController Failed to create a new Axis2 instance...
> org.apache.axis2.deployment.DeploymentException:
> org.apache.synapse.transport.fix.FIXTransportSender
>         at
>
> org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:694)
>        at
>
> org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:121)
>        at
>
> org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:707)
>        at
>
> org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
>        at
>
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
>        at
>
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory
> .java:206)
>        at
>
> org.apache.synapse.Axis2SynapseController.createNewInstance(Axis2SynapseController.java:494)
>        at
>
> org.apache.synapse.Axis2SynapseController.init(Axis2SynapseController.java:116)
>        at org.apache.synapse.ServerManager.doInit(ServerManager.java:419)
>        at org.apache.synapse.ServerManager.init(ServerManager.java:108)
>        at org.apache.synapse.SynapseServer.main(SynapseServer.java:62)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at
> org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.synapse.transport.fix.FIXTransportSender
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Class.java:164)
>        at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
>        at
>
> org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:669)
>        ... 16 more
>
> WrapperSimpleApp: Encountered an error running main:
> org.apache.synapse.SynapseException: Failed to create a new Axis2
> instance...
> org.apache.synapse.SynapseException: Failed to create a new Axis2
> instance...
>        at
>
> org.apache.synapse.Axis2SynapseController.handleFatal(Axis2SynapseController.java:786)
>        at
>
> org.apache.synapse.Axis2SynapseController.createNewInstance(Axis2SynapseController.java:517)
>        at
>
> org.apache.synapse.Axis2SynapseController.init(Axis2SynapseController.java:116)
>        at org.apache.synapse.ServerManager.doInit(ServerManager.java:419)
>        at org.apache.synapse.ServerManager.init(ServerManager.java:108)
>        at org.apache.synapse.SynapseServer.main(SynapseServer.java:62)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at
> org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.axis2.deployment.DeploymentException:
> org.apache.synapse.transport.fix.FIXTransportSender
>         at
>
> org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:694)
>        at
>
> org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:121)
>        at
>
> org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:707)
>        at
>
> org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
>        at
>
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
>        at
>
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory
> .java:206)
>        at
>
> org.apache.synapse.Axis2SynapseController.createNewInstance(Axis2SynapseController.java:494)
>        ... 10 more
> Caused by: java.lang.ClassNotFoundException:
> org.apache.synapse.transport.fix.FIXTransportSender
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Class.java:164)
>        at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
>        at
>
> org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:669)
>        ... 16 more
> <-- Wrapper Stopped
>
> I'm not sure if this has anything to do with the FIX jars but I'm using the
> same ones that I did with my older build.
>
> Thanks,
> Bill
>
> PrgTrdr wrote:
> >
> > Thanks Asanka, I will get the latest build tonight.
> > Bill
> >
> > asankaa wrote:
> >>
> >> Hi Bill,
> >> Yes, you are getting the NPE because the build you are using does not
> >> have the change that Hiranya mentioned earlier. We did that change
> >> couple of weeks back so please take a update of the source and create a
> >> new build.
> >> - Asanka
> >>
> >> PrgTrdr wrote:
> >>> Do you think this is because I'm using Synapse-TRUNK from about a month
> >>> ago?
> >>> Or should this functionality be in that version?
> >>>
> >>> Thanks,
> >>> Bill
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/HTTP--%3E-FIX-Response-Handling-tp24505424p24532506.html
> Sent from the Synapse - User mailing list archive at Nabble.com.
>
>


-- 
Hiranya Jayathilaka
Software Engineer;
WSO2 Inc.;  http://wso2.org
E-mail: hiranya@wso2.com;  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com

Re: HTTP -> FIX Response Handling

Posted by PrgTrdr <pr...@gmail.com>.
Hiranya, Asanka,

I got last night's build and am not able to start Synapse (even with default
synapse.xml).  Here's the log output:

2009-07-17 06:45:10,388 [-] [WrapperSimpleAppMain]  INFO SynapseServer
Starting Apache Synapse...
2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
SynapseControllerFactory Using Synapse home : C:\Apache\SYNAPS~4\.
2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
SynapseControllerFactory Using Axis2 repository : C:\Apache\SYNAPS~4\reposi
tory
2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
SynapseControllerFactory Using axis2.xml location : C:\Apache\SYNAPS~4\repo
sitory\conf\axis2.xml
2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
SynapseControllerFactory Using synapse.xml location : C:\Apache\SYNAPS~4\bi
n\..\repository\conf\synapse.xml
2009-07-17 06:45:10,488 [-] [WrapperSimpleAppMain]  INFO
SynapseControllerFactory Using server name : localhost
2009-07-17 06:45:10,548 [-] [WrapperSimpleAppMain]  INFO
SynapseControllerFactory The timeout handler will run every : 15s
2009-07-17 06:45:10,668 [-] [WrapperSimpleAppMain]  INFO
Axis2SynapseController Initializing Synapse at : Fri Jul 17 06:45:10 EDT 20
09
2009-07-17 06:45:11,209 [-] [WrapperSimpleAppMain] FATAL
Axis2SynapseController Failed to create a new Axis2 instance...
org.apache.axis2.deployment.DeploymentException:
org.apache.synapse.transport.fix.FIXTransportSender
        at
org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:694)
        at
org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:121)
        at
org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:707)
        at
org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
        at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
        at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory
.java:206)
        at
org.apache.synapse.Axis2SynapseController.createNewInstance(Axis2SynapseController.java:494)
        at
org.apache.synapse.Axis2SynapseController.init(Axis2SynapseController.java:116)
        at org.apache.synapse.ServerManager.doInit(ServerManager.java:419)
        at org.apache.synapse.ServerManager.init(ServerManager.java:108)
        at org.apache.synapse.SynapseServer.main(SynapseServer.java:62)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException:
org.apache.synapse.transport.fix.FIXTransportSender
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
        at
org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:669)
        ... 16 more

WrapperSimpleApp: Encountered an error running main:
org.apache.synapse.SynapseException: Failed to create a new Axis2
instance...
org.apache.synapse.SynapseException: Failed to create a new Axis2
instance...
        at
org.apache.synapse.Axis2SynapseController.handleFatal(Axis2SynapseController.java:786)
        at
org.apache.synapse.Axis2SynapseController.createNewInstance(Axis2SynapseController.java:517)
        at
org.apache.synapse.Axis2SynapseController.init(Axis2SynapseController.java:116)
        at org.apache.synapse.ServerManager.doInit(ServerManager.java:419)
        at org.apache.synapse.ServerManager.init(ServerManager.java:108)
        at org.apache.synapse.SynapseServer.main(SynapseServer.java:62)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.axis2.deployment.DeploymentException:
org.apache.synapse.transport.fix.FIXTransportSender
        at
org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:694)
        at
org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:121)
        at
org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:707)
        at
org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
        at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
        at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory
.java:206)
        at
org.apache.synapse.Axis2SynapseController.createNewInstance(Axis2SynapseController.java:494)
        ... 10 more
Caused by: java.lang.ClassNotFoundException:
org.apache.synapse.transport.fix.FIXTransportSender
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
        at
org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:669)
        ... 16 more
<-- Wrapper Stopped

I'm not sure if this has anything to do with the FIX jars but I'm using the
same ones that I did with my older build.

Thanks,
Bill

PrgTrdr wrote:
> 
> Thanks Asanka, I will get the latest build tonight. 
> Bill
> 
> asankaa wrote:
>> 
>> Hi Bill,
>> Yes, you are getting the NPE because the build you are using does not 
>> have the change that Hiranya mentioned earlier. We did that change 
>> couple of weeks back so please take a update of the source and create a 
>> new build.
>> - Asanka
>> 
>> PrgTrdr wrote:
>>> Do you think this is because I'm using Synapse-TRUNK from about a month
>>> ago? 
>>> Or should this functionality be in that version?
>>>
>>> Thanks,
>>> Bill
>>>
>>>
>>>   
>> 
>> 
>> 
> 
> 

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


Re: HTTP -> FIX Response Handling

Posted by PrgTrdr <pr...@gmail.com>.
Thanks Asanka, I will get the latest build tonight. 
Bill

asankaa wrote:
> 
> Hi Bill,
> Yes, you are getting the NPE because the build you are using does not 
> have the change that Hiranya mentioned earlier. We did that change 
> couple of weeks back so please take a update of the source and create a 
> new build.
> - Asanka
> 
> PrgTrdr wrote:
>> Do you think this is because I'm using Synapse-TRUNK from about a month
>> ago? 
>> Or should this functionality be in that version?
>>
>> Thanks,
>> Bill
>>
>>
>>   
> 
> 
> 

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


Re: HTTP -> FIX Response Handling

Posted by Asanka Abeysinghe <as...@wso2.com>.
Hi Bill,
Yes, you are getting the NPE because the build you are using does not 
have the change that Hiranya mentioned earlier. We did that change 
couple of weeks back so please take a update of the source and create a 
new build.
- Asanka

PrgTrdr wrote:
> Do you think this is because I'm using Synapse-TRUNK from about a month ago? 
> Or should this functionality be in that version?
>
> Thanks,
> Bill
>
>
>   


Re: HTTP -> FIX Response Handling

Posted by PrgTrdr <pr...@gmail.com>.
Hi Hiranya,

I feel like I'm making some progress but it's still not quite there.  I
placed the <property> mediator you suggested immediately before the <send>
mediator in the <out> sequence and it now appears that the message is
getting to the FIX logic.  But then it stops with the following NPE:

2009-07-16 13:48:50,422 [-] [SynapseWorker-1]  INFO LogMediator
GMMR-OrderRep-GenFIX = GMMR-OrderRep about to send the following to FIX
session...
2009-07-16 13:48:50,422 [-] [SynapseWorker-1]  INFO LogMediator To:
http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: ,
MessageID: urn:uuid:FF264C84B81C2AD6688038696696933553359936, Direction:
response, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
  <message xmlns:cfl="http://www.harts.com/cfl"
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" counter="1"
inSession="FIX.4.2:OPTMED->BROKER">
<header>
<field id="8">FIX.4.2</field>
<field id="35">8</field>
<field id="49">OPTMED</field>
<field id="52">20090716-08:37:51.051</field>
<field id="56">BROKER</field>
</header>
<body>
<field id="37">ON-1-1247751471617-2</field>
<field id="11">ClientOrd1</field>
<field id="38">1000</field>
<field id="40">2</field>
<field id="54">1</field>
<field id="55">MSQ</field>
<field id="59">0</field>
<field id="60">20090716-08:37:51.051</field>
</body>
</message>
 </soapenv:Body></soapenv:Envelope>
2009-07-16 13:48:50,452 [-] [SynapseWorker-1] ERROR Axis2Sender Unexpected
error during sending message out
java.lang.NullPointerException
	at
org.apache.synapse.transport.fix.FIXOutgoingMessageHandler.sendToTarget(FIXOutgoingMessageHandler.java:122)
	at
org.apache.synapse.transport.fix.FIXOutgoingMessageHandler.sendMessage(FIXOutgoingMessageHandler.java:82)
	at
org.apache.synapse.transport.fix.FIXTransportSender.sendUsingEPR(FIXTransportSender.java:309)
	at
org.apache.synapse.transport.fix.FIXTransportSender.sendMessage(FIXTransportSender.java:136)
	at
org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
	at
org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:190)
	at
org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:174)
	at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
	at
org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:343)
	at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:56)
	at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:176)
	at
org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:194)
	at
org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59)
	at
org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:75)
	at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
	at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
	at org.apache.synapse.mediators.MediatorWorker.run(MediatorWorker.java:69)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
	at java.lang.Thread.run(Thread.java:595)

Do you think this is because I'm using Synapse-TRUNK from about a month ago? 
Or should this functionality be in that version?

Thanks,
Bill


Hiranya Jayathilaka-3 wrote:
> 
> Hi Bill,
> My bad! I forgot to mention that you need to set the service name property
> using the property mediator, before calling the send mediator. Sorry about
> that. Use the property mediator as follows in your out sequence before the
> send mediator.
> 
> <property name="transport.fix.ServiceName" value="FIXProxy"
> scope="axis2-client"/>
> 
> The FIX transport sender requires that message context carries service
> information. If the message was received by the FIX transport listener it
> will set the service information. But in your scenario the message arrives
> over HTTP so we need to explicitly set it at service configuration level.
> 
> Thanks,
> Hiranya
> 
> On Thu, Jul 16, 2009 at 7:33 PM, PrgTrdr <pr...@gmail.com> wrote:
> 
>>
>> Thanks Hiranya,
>>
>> I believe you are offering the correct solution, however I'm still not
>> getting it right.
>>
>> 1.  At your suggestion, I inserted the following <send> mediator in my
>> <out>
>> sequence.
>>              <send>
>>                <endpoint>
>>                  <address
>>
>> uri="fix://localhost:9876?BeginString=FIX.4.2&amp;SenderCompID=OPTMED&amp;TargetCompID=BROKER"/>
>>                </endpoint>
>>              </send>
>>
>> 2.  When it reaches this point, Synapse gives the exception, "Unable to
>> find
>> a valid service for the message".  Here is the log output:
>> 2009-07-16 09:37:51,343 [-] [SynapseWorker-2]  INFO LogMediator To:
>> http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: ,
>> MessageID: urn:uuid:5191E37439E3958F4479756836588468614536389, Direction:
>> response, Envelope: <?xml version='1.0'
>> encoding='utf-8'?><soapenv:Envelope
>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
>>  <message xmlns:cfl="http://www.harts.com/cfl"
>> xmlns:fn="http://www.w3.org/2005/02/xpath-functions" counter="1"
>> inSession="FIX.4.2:OPTMED->BROKER">
>> <header>
>> <field id="8">FIX.4.2</field>
>> <field id="35">8</field>
>> <field id="49">OPTMED</field>
>> <field id="52">20090716-08:37:30.030</field>
>> <field id="56">BROKER</field>
>> </header>
>> <body>
>> <field id="37" />
>> <field id="11" />
>> <field id="38">1000</field>
>> <field id="40">2</field>
>> <field id="54">1</field>
>> <field id="55" />
>> <field id="59">3</field>
>> <field id="60">20090716-08:37:30.030</field>
>> </body>
>> </message>
>>  </soapenv:Body></soapenv:Envelope>
>> 2009-07-16 09:37:51,413 [-] [SynapseWorker-2] ERROR Axis2Sender
>> Unexpected
>> error during sending message out
>> org.apache.axis2.AxisFault: Unable to find a valid service for the
>> message
>>        at
>> org.apache.synapse.transport.fix.FIXUtils.getServiceName(FIXUtils.java:655)
>>        at
>>
>> org.apache.synapse.transport.fix.FIXTransportSender.sendMessage(FIXTransportSender.java:103)
>>        at
>>
>> org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
>>        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
>>        at
>>
>> org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:190)
>>        at
>>
>> org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:174)
>>        at
>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>>        at
>>
>> org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:343)
>>        at
>> org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:56)
>>        at
>>
>> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:176)
>>        at
>>
>> org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:194)
>>        at
>> org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59)
>>        at
>>
>> org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:75)
>>        at
>>
>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
>>        at
>>
>> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
>>        at
>> org.apache.synapse.mediators.MediatorWorker.run(MediatorWorker.java:69)
>>        at
>>
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
>>        at
>>
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
>>        at java.lang.Thread.run(Thread.java:595)
>> 2009-07-16 09:37:51,423 [-] [SynapseWorker-2]  WARN EndpointContext
>> Endpoint
>> : AnonymousEndpoint will be marked SUSPENDED as it failed
>>
>> 3.  Here is the FIXProxy definition (very similar to Sample 259):
>>    <endpoint name="test-system" >    <!-- Must use TCPMon as proxy -->
>>        <address uri="http://localhost:2001/api/v1" format="soap11" />
>>    </endpoint>
>>
>>    <proxy name="FIXProxy" transports="fix">
>>      <target endpoint="test-system" >
>>        <inSequence>
>>          <log level="full" />
>> .
>> .
>> .
>>          <!-- Translate the message -->
>>          <xslt key="xslt-key-req" />
>>          <log level="full" />
>>
>>      </inSequence>
>>
>>      <outSequence>
>>        <log level="full" />
>>
>>        <sequence key="HandleResponse1" />
>>        <sequence key="HandleResponse2" />
>>
>>        <log level="full" />
>>        <send />
>>
>>      </outSequence>
>>    </target>
>>
>>    <parameter
>>
>> name="transport.fix.AcceptorConfigURL">file:repository/conf/OptMed/resources/fix/FIX-OptMed.cfg</parameter>
>>    <parameter name="transport.fix.AcceptorMessageStore">file</parameter>
>>    <parameter name="transport.fix.AcceptorLogFactory">file</parameter>
>>  </proxy>
>>
>> 4.  Here is the FIX configuration file FIX-OptMed.cfg referenced in the
>> FIXProxy definition (very similar to default Sample setup):
>> [default]
>> FileStorePath=logs/fix/OptMed
>> FileLogPath=logs/fix/OptMed
>> ConnectionType=acceptor
>> StartTime=00:00:00
>> EndTime=00:00:00
>> HeartBtInt=30
>> ValidOrderTypes=1,2,F
>> SenderCompID=OPTMED
>> TargetCompID=BROKER
>> UseDataDictionary=Y
>> DefaultMarketPrice=12.30
>> ResetOnLogon=Y
>> ResetOnDisconnect=Y
>>
>> [session]
>> BeginString=FIX.4.2
>> SocketAcceptPort=9876
>>
>> DataDictionary=C:\Apache\Synapse-Snapshot\repository\conf\OptMed\resources\fix\DD-OptMed42.xml
>>
>> Thanks again for your help.
>> Bill
>>
>>
>> Hiranya Jayathilaka-3 wrote:
>> >
>> > Hi Bill,
>> >
>> > On Thu, Jul 16, 2009 at 6:17 PM, PrgTrdr <pr...@gmail.com> wrote:
>> >
>> >>
>> >> 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.
>> >
>> >
>> > I believe what you want to do is to pass the market data messages
>> coming
>> > from the WS to the FIX acceptor session on which your proxy service is
>> > listening on. Is that correct? In that case you could address the FIX
>> > session by giving it an EPR and then use the send mediator to forward
>> > messages to the FIX session. For an example let's say your FIX session
>> has
>> > following parameters.
>> >
>> > BeginString=FIX.4.4
>> > SenderCompID=SYNAPSE
>> > TargetCompID=MyComp
>> >
>> > Then we can use the following EPR to address the FIX session:
>> >
>> >
>> fix://localhost:9876?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=MyComp
>> >
>> >
>> > Replace the port number (9876) with the actual port number on which
>> your
>> > FIX
>> > proxy service is listening on. Now in the main sequence you can use the
>> > send
>> > mediator as follows to forward messages to the FIX session.
>> >
>> > <send>
>> >   <endpoint>
>> >       <address
>> >
>> uri="fix://localhost:9876?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=MyComp
>> > "/>
>> >   </endpoint>
>> > </send>
>> >
>> > Does this achive your goal?
>> >
>> > Also please note that the initial FIX transport implementation did not
>> > support scenarios as complex as this. The enhancements required to run
>> > this
>> > scenario was done very recently and hence this will work only on
>> Synapse
>> > snapshot builds until we get the next release out. On earlier releases
>> you
>> > will get an NPE if you try to do this.
>> >
>> > Thanks,
>> > Hiranya
>> >
>> >
>> >
>> >>
>> >> 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 <pr...@gmail.com> 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: hiranya@wso2.com;  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.
>> >>
>> >>
>> >
>> >
>> > --
>> > Hiranya Jayathilaka
>> > Software Engineer;
>> > WSO2 Inc.;  http://wso2.org
>> > E-mail: hiranya@wso2.com;  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-tp24505424p24517040.html
>> Sent from the Synapse - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Hiranya Jayathilaka
> Software Engineer;
> WSO2 Inc.;  http://wso2.org
> E-mail: hiranya@wso2.com;  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-tp24505424p24521522.html
Sent from the Synapse - User mailing list archive at Nabble.com.


Re: HTTP -> FIX Response Handling

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Bill,

On Fri, Jul 17, 2009 at 7:56 PM, PrgTrdr <pr...@gmail.com> wrote:

>
> Hiranya & Asankha,
>
> Thanks very much for your help.  It's finally working!


You are most welcome and it's great to hear that you got it all working.

>
>
> It would be great to have a sample that shows asynchronous message
> handling.
> If there's a need for one I will write it when I get a few extra minutes.
> I'm already on the hook to extend the XSLT sample to show parameter
> passing.


Excellent! Please make the necessary additions to the documentation and
provide a patch through our JIRA. We always welcome new useful documentation
:)

Thanks,
Hiranya


>
> Thanks,
> Bill
>
>
>
>
> Hiranya Jayathilaka-3 wrote:
> >
> > Hi Bill,
> > My bad! I forgot to mention that you need to set the service name
> property
> > using the property mediator, before calling the send mediator. Sorry
> about
> > that. Use the property mediator as follows in your out sequence before
> the
> > send mediator.
> >
> > <property name="transport.fix.ServiceName" value="FIXProxy"
> > scope="axis2-client"/>
> >
> > The FIX transport sender requires that message context carries service
> > information. If the message was received by the FIX transport listener it
> > will set the service information. But in your scenario the message
> arrives
> > over HTTP so we need to explicitly set it at service configuration level.
> >
> > Thanks,
> > Hiranya
> >
> > On Thu, Jul 16, 2009 at 7:33 PM, PrgTrdr <pr...@gmail.com> wrote:
> >
> >>
> >> Thanks Hiranya,
> >>
> >> I believe you are offering the correct solution, however I'm still not
> >> getting it right.
> >>
> >> 1.  At your suggestion, I inserted the following <send> mediator in my
> >> <out>
> >> sequence.
> >>              <send>
> >>                <endpoint>
> >>                  <address
> >>
> >>
> uri="fix://localhost:9876?BeginString=FIX.4.2&amp;SenderCompID=OPTMED&amp;TargetCompID=BROKER"/>
> >>                </endpoint>
> >>              </send>
> >>
> >> 2.  When it reaches this point, Synapse gives the exception, "Unable to
> >> find
> >> a valid service for the message".  Here is the log output:
> >> 2009-07-16 09:37:51,343 [-] [SynapseWorker-2]  INFO LogMediator To:
> >> http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction:
> ,
> >> MessageID: urn:uuid:5191E37439E3958F4479756836588468614536389,
> Direction:
> >> response, Envelope: <?xml version='1.0'
> >> encoding='utf-8'?><soapenv:Envelope
> >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> "><soapenv:Body>
> >>  <message xmlns:cfl="http://www.harts.com/cfl"
> >> xmlns:fn="http://www.w3.org/2005/02/xpath-functions" counter="1"
> >> inSession="FIX.4.2:OPTMED->BROKER">
> >> <header>
> >> <field id="8">FIX.4.2</field>
> >> <field id="35">8</field>
> >> <field id="49">OPTMED</field>
> >> <field id="52">20090716-08:37:30.030</field>
> >> <field id="56">BROKER</field>
> >> </header>
> >> <body>
> >> <field id="37" />
> >> <field id="11" />
> >> <field id="38">1000</field>
> >> <field id="40">2</field>
> >> <field id="54">1</field>
> >> <field id="55" />
> >> <field id="59">3</field>
> >> <field id="60">20090716-08:37:30.030</field>
> >> </body>
> >> </message>
> >>  </soapenv:Body></soapenv:Envelope>
> >> 2009-07-16 09:37:51,413 [-] [SynapseWorker-2] ERROR Axis2Sender
> >> Unexpected
> >> error during sending message out
> >> org.apache.axis2.AxisFault: Unable to find a valid service for the
> >> message
> >>        at
> >>
> org.apache.synapse.transport.fix.FIXUtils.getServiceName(FIXUtils.java:655)
> >>        at
> >>
> >>
> org.apache.synapse.transport.fix.FIXTransportSender.sendMessage(FIXTransportSender.java:103)
> >>        at
> >>
> >>
> org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
> >>        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
> >>        at
> >>
> >>
> org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:190)
> >>        at
> >>
> >>
> org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:174)
> >>        at
> >>
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
> >>        at
> >>
> >>
> org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:343)
> >>        at
> >> org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:56)
> >>        at
> >>
> >>
> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:176)
> >>        at
> >>
> >>
> org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:194)
> >>        at
> >>
> org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59)
> >>        at
> >>
> >>
> org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:75)
> >>        at
> >>
> >>
> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
> >>        at
> >>
> >>
> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
> >>        at
> >> org.apache.synapse.mediators.MediatorWorker.run(MediatorWorker.java:69)
> >>        at
> >>
> >>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
> >>        at
> >>
> >>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
> >>        at java.lang.Thread.run(Thread.java:595)
> >> 2009-07-16 09:37:51,423 [-] [SynapseWorker-2]  WARN EndpointContext
> >> Endpoint
> >> : AnonymousEndpoint will be marked SUSPENDED as it failed
> >>
> >> 3.  Here is the FIXProxy definition (very similar to Sample 259):
> >>    <endpoint name="test-system" >    <!-- Must use TCPMon as proxy -->
> >>        <address uri="http://localhost:2001/api/v1" format="soap11" />
> >>    </endpoint>
> >>
> >>    <proxy name="FIXProxy" transports="fix">
> >>      <target endpoint="test-system" >
> >>        <inSequence>
> >>          <log level="full" />
> >> .
> >> .
> >> .
> >>          <!-- Translate the message -->
> >>          <xslt key="xslt-key-req" />
> >>          <log level="full" />
> >>
> >>      </inSequence>
> >>
> >>      <outSequence>
> >>        <log level="full" />
> >>
> >>        <sequence key="HandleResponse1" />
> >>        <sequence key="HandleResponse2" />
> >>
> >>        <log level="full" />
> >>        <send />
> >>
> >>      </outSequence>
> >>    </target>
> >>
> >>    <parameter
> >>
> >>
> name="transport.fix.AcceptorConfigURL">file:repository/conf/OptMed/resources/fix/FIX-OptMed.cfg</parameter>
> >>    <parameter name="transport.fix.AcceptorMessageStore">file</parameter>
> >>    <parameter name="transport.fix.AcceptorLogFactory">file</parameter>
> >>  </proxy>
> >>
> >> 4.  Here is the FIX configuration file FIX-OptMed.cfg referenced in the
> >> FIXProxy definition (very similar to default Sample setup):
> >> [default]
> >> FileStorePath=logs/fix/OptMed
> >> FileLogPath=logs/fix/OptMed
> >> ConnectionType=acceptor
> >> StartTime=00:00:00
> >> EndTime=00:00:00
> >> HeartBtInt=30
> >> ValidOrderTypes=1,2,F
> >> SenderCompID=OPTMED
> >> TargetCompID=BROKER
> >> UseDataDictionary=Y
> >> DefaultMarketPrice=12.30
> >> ResetOnLogon=Y
> >> ResetOnDisconnect=Y
> >>
> >> [session]
> >> BeginString=FIX.4.2
> >> SocketAcceptPort=9876
> >>
> >>
> DataDictionary=C:\Apache\Synapse-Snapshot\repository\conf\OptMed\resources\fix\DD-OptMed42.xml
> >>
> >> Thanks again for your help.
> >> Bill
> >>
> >>
> >> Hiranya Jayathilaka-3 wrote:
> >> >
> >> > Hi Bill,
> >> >
> >> > On Thu, Jul 16, 2009 at 6:17 PM, PrgTrdr <pr...@gmail.com> wrote:
> >> >
> >> >>
> >> >> 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.
> >> >
> >> >
> >> > I believe what you want to do is to pass the market data messages
> >> coming
> >> > from the WS to the FIX acceptor session on which your proxy service is
> >> > listening on. Is that correct? In that case you could address the FIX
> >> > session by giving it an EPR and then use the send mediator to forward
> >> > messages to the FIX session. For an example let's say your FIX session
> >> has
> >> > following parameters.
> >> >
> >> > BeginString=FIX.4.4
> >> > SenderCompID=SYNAPSE
> >> > TargetCompID=MyComp
> >> >
> >> > Then we can use the following EPR to address the FIX session:
> >> >
> >> >
> >>
> fix://localhost:9876?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=MyComp
> >> >
> >> >
> >> > Replace the port number (9876) with the actual port number on which
> >> your
> >> > FIX
> >> > proxy service is listening on. Now in the main sequence you can use
> the
> >> > send
> >> > mediator as follows to forward messages to the FIX session.
> >> >
> >> > <send>
> >> >   <endpoint>
> >> >       <address
> >> >
> >>
> uri="fix://localhost:9876?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=MyComp
> >> > "/>
> >> >   </endpoint>
> >> > </send>
> >> >
> >> > Does this achive your goal?
> >> >
> >> > Also please note that the initial FIX transport implementation did not
> >> > support scenarios as complex as this. The enhancements required to run
> >> > this
> >> > scenario was done very recently and hence this will work only on
> >> Synapse
> >> > snapshot builds until we get the next release out. On earlier releases
> >> you
> >> > will get an NPE if you try to do this.
> >> >
> >> > Thanks,
> >> > Hiranya
> >> >
> >> >
> >> >
> >> >>
> >> >> 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 <pr...@gmail.com>
> 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: hiranya@wso2.com;  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.
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Hiranya Jayathilaka
> >> > Software Engineer;
> >> > WSO2 Inc.;  http://wso2.org
> >> > E-mail: hiranya@wso2.com;  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-tp24505424p24517040.html
> >> Sent from the Synapse - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Hiranya Jayathilaka
> > Software Engineer;
> > WSO2 Inc.;  http://wso2.org
> > E-mail: hiranya@wso2.com;  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-tp24505424p24535501.html
> Sent from the Synapse - User mailing list archive at Nabble.com.
>
>


-- 
Hiranya Jayathilaka
Software Engineer;
WSO2 Inc.;  http://wso2.org
E-mail: hiranya@wso2.com;  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com

Re: HTTP -> FIX Response Handling

Posted by PrgTrdr <pr...@gmail.com>.
Hiranya & Asankha,

Thanks very much for your help.  It's finally working!

It would be great to have a sample that shows asynchronous message handling. 
If there's a need for one I will write it when I get a few extra minutes. 
I'm already on the hook to extend the XSLT sample to show parameter passing.

Thanks,
Bill




Hiranya Jayathilaka-3 wrote:
> 
> Hi Bill,
> My bad! I forgot to mention that you need to set the service name property
> using the property mediator, before calling the send mediator. Sorry about
> that. Use the property mediator as follows in your out sequence before the
> send mediator.
> 
> <property name="transport.fix.ServiceName" value="FIXProxy"
> scope="axis2-client"/>
> 
> The FIX transport sender requires that message context carries service
> information. If the message was received by the FIX transport listener it
> will set the service information. But in your scenario the message arrives
> over HTTP so we need to explicitly set it at service configuration level.
> 
> Thanks,
> Hiranya
> 
> On Thu, Jul 16, 2009 at 7:33 PM, PrgTrdr <pr...@gmail.com> wrote:
> 
>>
>> Thanks Hiranya,
>>
>> I believe you are offering the correct solution, however I'm still not
>> getting it right.
>>
>> 1.  At your suggestion, I inserted the following <send> mediator in my
>> <out>
>> sequence.
>>              <send>
>>                <endpoint>
>>                  <address
>>
>> uri="fix://localhost:9876?BeginString=FIX.4.2&amp;SenderCompID=OPTMED&amp;TargetCompID=BROKER"/>
>>                </endpoint>
>>              </send>
>>
>> 2.  When it reaches this point, Synapse gives the exception, "Unable to
>> find
>> a valid service for the message".  Here is the log output:
>> 2009-07-16 09:37:51,343 [-] [SynapseWorker-2]  INFO LogMediator To:
>> http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: ,
>> MessageID: urn:uuid:5191E37439E3958F4479756836588468614536389, Direction:
>> response, Envelope: <?xml version='1.0'
>> encoding='utf-8'?><soapenv:Envelope
>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
>>  <message xmlns:cfl="http://www.harts.com/cfl"
>> xmlns:fn="http://www.w3.org/2005/02/xpath-functions" counter="1"
>> inSession="FIX.4.2:OPTMED->BROKER">
>> <header>
>> <field id="8">FIX.4.2</field>
>> <field id="35">8</field>
>> <field id="49">OPTMED</field>
>> <field id="52">20090716-08:37:30.030</field>
>> <field id="56">BROKER</field>
>> </header>
>> <body>
>> <field id="37" />
>> <field id="11" />
>> <field id="38">1000</field>
>> <field id="40">2</field>
>> <field id="54">1</field>
>> <field id="55" />
>> <field id="59">3</field>
>> <field id="60">20090716-08:37:30.030</field>
>> </body>
>> </message>
>>  </soapenv:Body></soapenv:Envelope>
>> 2009-07-16 09:37:51,413 [-] [SynapseWorker-2] ERROR Axis2Sender
>> Unexpected
>> error during sending message out
>> org.apache.axis2.AxisFault: Unable to find a valid service for the
>> message
>>        at
>> org.apache.synapse.transport.fix.FIXUtils.getServiceName(FIXUtils.java:655)
>>        at
>>
>> org.apache.synapse.transport.fix.FIXTransportSender.sendMessage(FIXTransportSender.java:103)
>>        at
>>
>> org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
>>        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
>>        at
>>
>> org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:190)
>>        at
>>
>> org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:174)
>>        at
>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>>        at
>>
>> org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:343)
>>        at
>> org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:56)
>>        at
>>
>> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:176)
>>        at
>>
>> org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:194)
>>        at
>> org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59)
>>        at
>>
>> org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:75)
>>        at
>>
>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
>>        at
>>
>> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
>>        at
>> org.apache.synapse.mediators.MediatorWorker.run(MediatorWorker.java:69)
>>        at
>>
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
>>        at
>>
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
>>        at java.lang.Thread.run(Thread.java:595)
>> 2009-07-16 09:37:51,423 [-] [SynapseWorker-2]  WARN EndpointContext
>> Endpoint
>> : AnonymousEndpoint will be marked SUSPENDED as it failed
>>
>> 3.  Here is the FIXProxy definition (very similar to Sample 259):
>>    <endpoint name="test-system" >    <!-- Must use TCPMon as proxy -->
>>        <address uri="http://localhost:2001/api/v1" format="soap11" />
>>    </endpoint>
>>
>>    <proxy name="FIXProxy" transports="fix">
>>      <target endpoint="test-system" >
>>        <inSequence>
>>          <log level="full" />
>> .
>> .
>> .
>>          <!-- Translate the message -->
>>          <xslt key="xslt-key-req" />
>>          <log level="full" />
>>
>>      </inSequence>
>>
>>      <outSequence>
>>        <log level="full" />
>>
>>        <sequence key="HandleResponse1" />
>>        <sequence key="HandleResponse2" />
>>
>>        <log level="full" />
>>        <send />
>>
>>      </outSequence>
>>    </target>
>>
>>    <parameter
>>
>> name="transport.fix.AcceptorConfigURL">file:repository/conf/OptMed/resources/fix/FIX-OptMed.cfg</parameter>
>>    <parameter name="transport.fix.AcceptorMessageStore">file</parameter>
>>    <parameter name="transport.fix.AcceptorLogFactory">file</parameter>
>>  </proxy>
>>
>> 4.  Here is the FIX configuration file FIX-OptMed.cfg referenced in the
>> FIXProxy definition (very similar to default Sample setup):
>> [default]
>> FileStorePath=logs/fix/OptMed
>> FileLogPath=logs/fix/OptMed
>> ConnectionType=acceptor
>> StartTime=00:00:00
>> EndTime=00:00:00
>> HeartBtInt=30
>> ValidOrderTypes=1,2,F
>> SenderCompID=OPTMED
>> TargetCompID=BROKER
>> UseDataDictionary=Y
>> DefaultMarketPrice=12.30
>> ResetOnLogon=Y
>> ResetOnDisconnect=Y
>>
>> [session]
>> BeginString=FIX.4.2
>> SocketAcceptPort=9876
>>
>> DataDictionary=C:\Apache\Synapse-Snapshot\repository\conf\OptMed\resources\fix\DD-OptMed42.xml
>>
>> Thanks again for your help.
>> Bill
>>
>>
>> Hiranya Jayathilaka-3 wrote:
>> >
>> > Hi Bill,
>> >
>> > On Thu, Jul 16, 2009 at 6:17 PM, PrgTrdr <pr...@gmail.com> wrote:
>> >
>> >>
>> >> 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.
>> >
>> >
>> > I believe what you want to do is to pass the market data messages
>> coming
>> > from the WS to the FIX acceptor session on which your proxy service is
>> > listening on. Is that correct? In that case you could address the FIX
>> > session by giving it an EPR and then use the send mediator to forward
>> > messages to the FIX session. For an example let's say your FIX session
>> has
>> > following parameters.
>> >
>> > BeginString=FIX.4.4
>> > SenderCompID=SYNAPSE
>> > TargetCompID=MyComp
>> >
>> > Then we can use the following EPR to address the FIX session:
>> >
>> >
>> fix://localhost:9876?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=MyComp
>> >
>> >
>> > Replace the port number (9876) with the actual port number on which
>> your
>> > FIX
>> > proxy service is listening on. Now in the main sequence you can use the
>> > send
>> > mediator as follows to forward messages to the FIX session.
>> >
>> > <send>
>> >   <endpoint>
>> >       <address
>> >
>> uri="fix://localhost:9876?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=MyComp
>> > "/>
>> >   </endpoint>
>> > </send>
>> >
>> > Does this achive your goal?
>> >
>> > Also please note that the initial FIX transport implementation did not
>> > support scenarios as complex as this. The enhancements required to run
>> > this
>> > scenario was done very recently and hence this will work only on
>> Synapse
>> > snapshot builds until we get the next release out. On earlier releases
>> you
>> > will get an NPE if you try to do this.
>> >
>> > Thanks,
>> > Hiranya
>> >
>> >
>> >
>> >>
>> >> 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 <pr...@gmail.com> 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: hiranya@wso2.com;  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.
>> >>
>> >>
>> >
>> >
>> > --
>> > Hiranya Jayathilaka
>> > Software Engineer;
>> > WSO2 Inc.;  http://wso2.org
>> > E-mail: hiranya@wso2.com;  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-tp24505424p24517040.html
>> Sent from the Synapse - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Hiranya Jayathilaka
> Software Engineer;
> WSO2 Inc.;  http://wso2.org
> E-mail: hiranya@wso2.com;  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-tp24505424p24535501.html
Sent from the Synapse - User mailing list archive at Nabble.com.


Re: HTTP -> FIX Response Handling

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Bill,
My bad! I forgot to mention that you need to set the service name property
using the property mediator, before calling the send mediator. Sorry about
that. Use the property mediator as follows in your out sequence before the
send mediator.

<property name="transport.fix.ServiceName" value="FIXProxy"
scope="axis2-client"/>

The FIX transport sender requires that message context carries service
information. If the message was received by the FIX transport listener it
will set the service information. But in your scenario the message arrives
over HTTP so we need to explicitly set it at service configuration level.

Thanks,
Hiranya

On Thu, Jul 16, 2009 at 7:33 PM, PrgTrdr <pr...@gmail.com> wrote:

>
> Thanks Hiranya,
>
> I believe you are offering the correct solution, however I'm still not
> getting it right.
>
> 1.  At your suggestion, I inserted the following <send> mediator in my
> <out>
> sequence.
>              <send>
>                <endpoint>
>                  <address
>
> uri="fix://localhost:9876?BeginString=FIX.4.2&amp;SenderCompID=OPTMED&amp;TargetCompID=BROKER"/>
>                </endpoint>
>              </send>
>
> 2.  When it reaches this point, Synapse gives the exception, "Unable to
> find
> a valid service for the message".  Here is the log output:
> 2009-07-16 09:37:51,343 [-] [SynapseWorker-2]  INFO LogMediator To:
> http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: ,
> MessageID: urn:uuid:5191E37439E3958F4479756836588468614536389, Direction:
> response, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
>  <message xmlns:cfl="http://www.harts.com/cfl"
> xmlns:fn="http://www.w3.org/2005/02/xpath-functions" counter="1"
> inSession="FIX.4.2:OPTMED->BROKER">
> <header>
> <field id="8">FIX.4.2</field>
> <field id="35">8</field>
> <field id="49">OPTMED</field>
> <field id="52">20090716-08:37:30.030</field>
> <field id="56">BROKER</field>
> </header>
> <body>
> <field id="37" />
> <field id="11" />
> <field id="38">1000</field>
> <field id="40">2</field>
> <field id="54">1</field>
> <field id="55" />
> <field id="59">3</field>
> <field id="60">20090716-08:37:30.030</field>
> </body>
> </message>
>  </soapenv:Body></soapenv:Envelope>
> 2009-07-16 09:37:51,413 [-] [SynapseWorker-2] ERROR Axis2Sender Unexpected
> error during sending message out
> org.apache.axis2.AxisFault: Unable to find a valid service for the message
>        at
> org.apache.synapse.transport.fix.FIXUtils.getServiceName(FIXUtils.java:655)
>        at
>
> org.apache.synapse.transport.fix.FIXTransportSender.sendMessage(FIXTransportSender.java:103)
>        at
>
> org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
>        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
>        at
>
> org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:190)
>        at
>
> org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:174)
>        at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>        at
>
> org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:343)
>        at
> org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:56)
>        at
>
> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:176)
>        at
>
> org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:194)
>        at
> org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59)
>        at
>
> org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:75)
>        at
>
> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
>        at
>
> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
>        at
> org.apache.synapse.mediators.MediatorWorker.run(MediatorWorker.java:69)
>        at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
>        at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
>        at java.lang.Thread.run(Thread.java:595)
> 2009-07-16 09:37:51,423 [-] [SynapseWorker-2]  WARN EndpointContext
> Endpoint
> : AnonymousEndpoint will be marked SUSPENDED as it failed
>
> 3.  Here is the FIXProxy definition (very similar to Sample 259):
>    <endpoint name="test-system" >    <!-- Must use TCPMon as proxy -->
>        <address uri="http://localhost:2001/api/v1" format="soap11" />
>    </endpoint>
>
>    <proxy name="FIXProxy" transports="fix">
>      <target endpoint="test-system" >
>        <inSequence>
>          <log level="full" />
> .
> .
> .
>          <!-- Translate the message -->
>          <xslt key="xslt-key-req" />
>          <log level="full" />
>
>      </inSequence>
>
>      <outSequence>
>        <log level="full" />
>
>        <sequence key="HandleResponse1" />
>        <sequence key="HandleResponse2" />
>
>        <log level="full" />
>        <send />
>
>      </outSequence>
>    </target>
>
>    <parameter
>
> name="transport.fix.AcceptorConfigURL">file:repository/conf/OptMed/resources/fix/FIX-OptMed.cfg</parameter>
>    <parameter name="transport.fix.AcceptorMessageStore">file</parameter>
>    <parameter name="transport.fix.AcceptorLogFactory">file</parameter>
>  </proxy>
>
> 4.  Here is the FIX configuration file FIX-OptMed.cfg referenced in the
> FIXProxy definition (very similar to default Sample setup):
> [default]
> FileStorePath=logs/fix/OptMed
> FileLogPath=logs/fix/OptMed
> ConnectionType=acceptor
> StartTime=00:00:00
> EndTime=00:00:00
> HeartBtInt=30
> ValidOrderTypes=1,2,F
> SenderCompID=OPTMED
> TargetCompID=BROKER
> UseDataDictionary=Y
> DefaultMarketPrice=12.30
> ResetOnLogon=Y
> ResetOnDisconnect=Y
>
> [session]
> BeginString=FIX.4.2
> SocketAcceptPort=9876
>
> DataDictionary=C:\Apache\Synapse-Snapshot\repository\conf\OptMed\resources\fix\DD-OptMed42.xml
>
> Thanks again for your help.
> Bill
>
>
> Hiranya Jayathilaka-3 wrote:
> >
> > Hi Bill,
> >
> > On Thu, Jul 16, 2009 at 6:17 PM, PrgTrdr <pr...@gmail.com> wrote:
> >
> >>
> >> 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.
> >
> >
> > I believe what you want to do is to pass the market data messages coming
> > from the WS to the FIX acceptor session on which your proxy service is
> > listening on. Is that correct? In that case you could address the FIX
> > session by giving it an EPR and then use the send mediator to forward
> > messages to the FIX session. For an example let's say your FIX session
> has
> > following parameters.
> >
> > BeginString=FIX.4.4
> > SenderCompID=SYNAPSE
> > TargetCompID=MyComp
> >
> > Then we can use the following EPR to address the FIX session:
> >
> >
> fix://localhost:9876?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=MyComp
> >
> >
> > Replace the port number (9876) with the actual port number on which your
> > FIX
> > proxy service is listening on. Now in the main sequence you can use the
> > send
> > mediator as follows to forward messages to the FIX session.
> >
> > <send>
> >   <endpoint>
> >       <address
> >
> uri="fix://localhost:9876?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=MyComp
> > "/>
> >   </endpoint>
> > </send>
> >
> > Does this achive your goal?
> >
> > Also please note that the initial FIX transport implementation did not
> > support scenarios as complex as this. The enhancements required to run
> > this
> > scenario was done very recently and hence this will work only on Synapse
> > snapshot builds until we get the next release out. On earlier releases
> you
> > will get an NPE if you try to do this.
> >
> > Thanks,
> > Hiranya
> >
> >
> >
> >>
> >> 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 <pr...@gmail.com> 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: hiranya@wso2.com;  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.
> >>
> >>
> >
> >
> > --
> > Hiranya Jayathilaka
> > Software Engineer;
> > WSO2 Inc.;  http://wso2.org
> > E-mail: hiranya@wso2.com;  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-tp24505424p24517040.html
> Sent from the Synapse - User mailing list archive at Nabble.com.
>
>


-- 
Hiranya Jayathilaka
Software Engineer;
WSO2 Inc.;  http://wso2.org
E-mail: hiranya@wso2.com;  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com

Re: HTTP -> FIX Response Handling

Posted by PrgTrdr <pr...@gmail.com>.
Thanks Hiranya,

I believe you are offering the correct solution, however I'm still not
getting it right.

1.  At your suggestion, I inserted the following <send> mediator in my <out>
sequence.
              <send>
                <endpoint>
                  <address
uri="fix://localhost:9876?BeginString=FIX.4.2&amp;SenderCompID=OPTMED&amp;TargetCompID=BROKER"/>
                </endpoint>
              </send>

2.  When it reaches this point, Synapse gives the exception, "Unable to find
a valid service for the message".  Here is the log output:
2009-07-16 09:37:51,343 [-] [SynapseWorker-2]  INFO LogMediator To:
http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: ,
MessageID: urn:uuid:5191E37439E3958F4479756836588468614536389, Direction:
response, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
  <message xmlns:cfl="http://www.harts.com/cfl"
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" counter="1"
inSession="FIX.4.2:OPTMED->BROKER">
<header>
<field id="8">FIX.4.2</field>
<field id="35">8</field>
<field id="49">OPTMED</field>
<field id="52">20090716-08:37:30.030</field>
<field id="56">BROKER</field>
</header>
<body>
<field id="37" />
<field id="11" />
<field id="38">1000</field>
<field id="40">2</field>
<field id="54">1</field>
<field id="55" />
<field id="59">3</field>
<field id="60">20090716-08:37:30.030</field>
</body>
</message>
 </soapenv:Body></soapenv:Envelope>
2009-07-16 09:37:51,413 [-] [SynapseWorker-2] ERROR Axis2Sender Unexpected
error during sending message out
org.apache.axis2.AxisFault: Unable to find a valid service for the message
	at
org.apache.synapse.transport.fix.FIXUtils.getServiceName(FIXUtils.java:655)
	at
org.apache.synapse.transport.fix.FIXTransportSender.sendMessage(FIXTransportSender.java:103)
	at
org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
	at
org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:190)
	at
org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:174)
	at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
	at
org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:343)
	at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:56)
	at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:176)
	at
org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:194)
	at
org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59)
	at
org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:75)
	at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
	at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
	at org.apache.synapse.mediators.MediatorWorker.run(MediatorWorker.java:69)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
	at java.lang.Thread.run(Thread.java:595)
2009-07-16 09:37:51,423 [-] [SynapseWorker-2]  WARN EndpointContext Endpoint
: AnonymousEndpoint will be marked SUSPENDED as it failed

3.  Here is the FIXProxy definition (very similar to Sample 259):
    <endpoint name="test-system" >    <!-- Must use TCPMon as proxy -->
        <address uri="http://localhost:2001/api/v1" format="soap11" />
    </endpoint>

    <proxy name="FIXProxy" transports="fix">
      <target endpoint="test-system" >
        <inSequence>
          <log level="full" />
.
.
.
          <!-- Translate the message -->
          <xslt key="xslt-key-req" />
          <log level="full" /> 

      </inSequence>

      <outSequence>
        <log level="full" />

        <sequence key="HandleResponse1" />
        <sequence key="HandleResponse2" />
        
        <log level="full" />
        <send />

      </outSequence>
    </target>
      
    <parameter
name="transport.fix.AcceptorConfigURL">file:repository/conf/OptMed/resources/fix/FIX-OptMed.cfg</parameter>
    <parameter name="transport.fix.AcceptorMessageStore">file</parameter>
    <parameter name="transport.fix.AcceptorLogFactory">file</parameter>
  </proxy>

4.  Here is the FIX configuration file FIX-OptMed.cfg referenced in the
FIXProxy definition (very similar to default Sample setup):
[default]
FileStorePath=logs/fix/OptMed
FileLogPath=logs/fix/OptMed
ConnectionType=acceptor
StartTime=00:00:00
EndTime=00:00:00
HeartBtInt=30
ValidOrderTypes=1,2,F
SenderCompID=OPTMED
TargetCompID=BROKER
UseDataDictionary=Y
DefaultMarketPrice=12.30
ResetOnLogon=Y
ResetOnDisconnect=Y

[session]
BeginString=FIX.4.2
SocketAcceptPort=9876
DataDictionary=C:\Apache\Synapse-Snapshot\repository\conf\OptMed\resources\fix\DD-OptMed42.xml

Thanks again for your help.
Bill


Hiranya Jayathilaka-3 wrote:
> 
> Hi Bill,
> 
> On Thu, Jul 16, 2009 at 6:17 PM, PrgTrdr <pr...@gmail.com> wrote:
> 
>>
>> 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.
> 
> 
> I believe what you want to do is to pass the market data messages coming
> from the WS to the FIX acceptor session on which your proxy service is
> listening on. Is that correct? In that case you could address the FIX
> session by giving it an EPR and then use the send mediator to forward
> messages to the FIX session. For an example let's say your FIX session has
> following parameters.
> 
> BeginString=FIX.4.4
> SenderCompID=SYNAPSE
> TargetCompID=MyComp
> 
> Then we can use the following EPR to address the FIX session:
> 
> fix://localhost:9876?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=MyComp
> 
> 
> Replace the port number (9876) with the actual port number on which your
> FIX
> proxy service is listening on. Now in the main sequence you can use the
> send
> mediator as follows to forward messages to the FIX session.
> 
> <send>
>   <endpoint>
>       <address
> uri="fix://localhost:9876?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=MyComp
> "/>
>   </endpoint>
> </send>
> 
> Does this achive your goal?
> 
> Also please note that the initial FIX transport implementation did not
> support scenarios as complex as this. The enhancements required to run
> this
> scenario was done very recently and hence this will work only on Synapse
> snapshot builds until we get the next release out. On earlier releases you
> will get an NPE if you try to do this.
> 
> Thanks,
> Hiranya
> 
> 
> 
>>
>> 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 <pr...@gmail.com> 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: hiranya@wso2.com;  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.
>>
>>
> 
> 
> -- 
> Hiranya Jayathilaka
> Software Engineer;
> WSO2 Inc.;  http://wso2.org
> E-mail: hiranya@wso2.com;  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-tp24505424p24517040.html
Sent from the Synapse - User mailing list archive at Nabble.com.


Re: HTTP -> FIX Response Handling

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Bill,

On Thu, Jul 16, 2009 at 6:17 PM, PrgTrdr <pr...@gmail.com> wrote:

>
> 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.


I believe what you want to do is to pass the market data messages coming
from the WS to the FIX acceptor session on which your proxy service is
listening on. Is that correct? In that case you could address the FIX
session by giving it an EPR and then use the send mediator to forward
messages to the FIX session. For an example let's say your FIX session has
following parameters.

BeginString=FIX.4.4
SenderCompID=SYNAPSE
TargetCompID=MyComp

Then we can use the following EPR to address the FIX session:

fix://localhost:9876?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=MyComp


Replace the port number (9876) with the actual port number on which your FIX
proxy service is listening on. Now in the main sequence you can use the send
mediator as follows to forward messages to the FIX session.

<send>
  <endpoint>
      <address
uri="fix://localhost:9876?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=MyComp
"/>
  </endpoint>
</send>

Does this achive your goal?

Also please note that the initial FIX transport implementation did not
support scenarios as complex as this. The enhancements required to run this
scenario was done very recently and hence this will work only on Synapse
snapshot builds until we get the next release out. On earlier releases you
will get an NPE if you try to do this.

Thanks,
Hiranya



>
> 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 <pr...@gmail.com> 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: hiranya@wso2.com;  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.
>
>


-- 
Hiranya Jayathilaka
Software Engineer;
WSO2 Inc.;  http://wso2.org
E-mail: hiranya@wso2.com;  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com

Re: HTTP -> FIX Response Handling

Posted by PrgTrdr <pr...@gmail.com>.
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 <pr...@gmail.com> 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: hiranya@wso2.com;  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.


Re: HTTP -> FIX Response Handling

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Bill,

On Thu, Jul 16, 2009 at 2:40 AM, PrgTrdr <pr...@gmail.com> 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: hiranya@wso2.com;  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com

Re: HTTP -> FIX Response Handling

Posted by Asanka Abeysinghe <as...@wso2.com>.
Hi,
Sample 259 drop the response due to the sample service does not provide 
a proper request that can convert into FIX. But with a service that 
sends a response with required values to create a FIX response, 
execution(fill/partly fill) or an ACK can send back to the sender using 
the FIX session created with Synapse and FIX client.
Please attach your Synapse confiuration to provide detailed information.
Regards
Asanka

PrgTrdr 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?
>
> Thanks,
> Bill
>