Hi,
I'm trying to send FIX messages using a JMS message producer (ActiveMQ impl) to a FIX endpoint and found the following problem.
Input message to Synapse looks like follows
-------------------------------------------------------------------------------------------------------
*<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
   <soapenv:Body>
       <axis2ns6:text
           xmlns:axis2ns6="http://ws.apache.org/commons/ns/payload";>
           &lt;?xml version='1.0'
encoding='utf-8'?>&lt;soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>&lt;soapenv:Body>&lt;message
           inSession="FIX.4.0:SYNAPSE->EXEC"
           counter="2">&lt;header>&lt;field
           id="8">&lt;![CDATA[FIX.4.0]]&gt;&lt;/field>&lt;field
           id="9">&lt;![CDATA[136]]&gt;&lt;/field>&lt;field
           id="34">&lt;![CDATA[3]]&gt;&lt;/field>&lt;field
           id="35">&lt;![CDATA[8]]&gt;&lt;/field>&lt;field
           id="49">&lt;![CDATA[EXEC]]&gt;&lt;/field>&lt;field
           id="52">&lt;![CDATA[20080618-08:41:56]]&gt;&lt;/field>&lt;field
id="56">&lt;![CDATA[SYNAPSE]]&gt;&lt;/field>&lt;/header>&lt;body>&lt;field
           id="6">&lt;![CDATA[12.3]]&gt;&lt;/field>&lt;field
           id="11">&lt;![CDATA[1213778514197]]&gt;&lt;/field>&lt;field
           id="14">&lt;![CDATA[100]]&gt;&lt;/field>&lt;field
           id="17">&lt;![CDATA[2]]&gt;&lt;/field>&lt;field
           id="20">&lt;![CDATA[0]]&gt;&lt;/field>&lt;field
           id="31">&lt;![CDATA[12.3]]&gt;&lt;/field>&lt;field
           id="32">&lt;![CDATA[100]]&gt;&lt;/field>&lt;field
           id="37">&lt;![CDATA[2]]&gt;&lt;/field>&lt;field
           id="38">&lt;![CDATA[100]]&gt;&lt;/field>&lt;field
           id="39">&lt;![CDATA[2]]&gt;&lt;/field>&lt;field
           id="54">&lt;![CDATA[1]]&gt;&lt;/field>&lt;field
id="55">&lt;![CDATA[GOOG]]&gt;&lt;/field>&lt;/body>&lt;trailer>&lt;field id="10">&lt;![CDATA[041]]&gt;&lt;/field>&lt;/trailer>&lt;/message>&lt;/soapenv:Body>&lt;/soapenv:Envelope>
       </axis2ns6:text>
   </soapenv:Body>
</soapenv:Envelope>
--------------------------------------------------------------------------------------------------------------------------------------

*Message payload has put inside a *axis2n6:text* element and convert the '<' '>' signs to '&gt' '&lt'. Message doesn't dispatch to the endpoint, it goes through the XML parsing and stops.

By getting some info from Ruwan I set the message content type to 'application/xml' using a JMS header property. With that I got the same result and Synapse did throw the following exception.

- [MessageContext: logID=urn:uuid:B9FC35EB27D48DA71C1214931262933] null
- OMException in getSOAPBuilder
org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found message at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:251) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:209) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createNextOMElement(StAXSOAPModelBuilder.java:191) at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:172) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:156) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:105) at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:677) at org.apache.synapse.transport.base.BaseUtils.setSOAPEnvelope(BaseUtils.java:222) at org.apache.synapse.transport.jms.JMSMessageReceiver$Worker.run(JMSMessageReceiver.java:216) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
   at java.lang.Thread.run(Thread.java:595)

Any idea about the issue ?
Asanka  A.

Reply via email to