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">
<?xml version='1.0'
encoding='utf-8'?><soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><message
inSession="FIX.4.0:SYNAPSE->EXEC"
counter="2"><header><field
id="8"><![CDATA[FIX.4.0]]></field><field
id="9"><![CDATA[136]]></field><field
id="34"><![CDATA[3]]></field><field
id="35"><![CDATA[8]]></field><field
id="49"><![CDATA[EXEC]]></field><field
id="52"><![CDATA[20080618-08:41:56]]></field><field
id="56"><![CDATA[SYNAPSE]]></field></header><body><field
id="6"><![CDATA[12.3]]></field><field
id="11"><![CDATA[1213778514197]]></field><field
id="14"><![CDATA[100]]></field><field
id="17"><![CDATA[2]]></field><field
id="20"><![CDATA[0]]></field><field
id="31"><![CDATA[12.3]]></field><field
id="32"><![CDATA[100]]></field><field
id="37"><![CDATA[2]]></field><field
id="38"><![CDATA[100]]></field><field
id="39"><![CDATA[2]]></field><field
id="54"><![CDATA[1]]></field><field
id="55"><![CDATA[GOOG]]></field></body><trailer><field
id="10"><![CDATA[041]]></field></trailer></message></soapenv:Body></soapenv:Envelope>
</axis2ns6:text>
</soapenv:Body>
</soapenv:Envelope>
--------------------------------------------------------------------------------------------------------------------------------------
*Message payload has put inside a *axis2n6:text* element and convert the
'<' '>' signs to '>' '<'. 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.