currently I am working with camel and wmq. What I tried to do is sending a message to wmq. I configure the camel by using Spring Framework. Here is how configure the wmq:
component.xml
<bean id="websphere-mq" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory">
<bean class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="transportType">
<util:constant static-field="com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP" />
</property>
<property name="hostName" value="localhost" />
<property name="port" value="1414" />
<property name="queueManager" value="localmanager" />
<property name="channel" value="CH.ADM1" />
<property name="CCSID" value="819"/>
<property name="useConnectionPooling" value="true" />
</bean>
</property>
</bean>
config.xml
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="stream:in?promptMessage=Ausweisnummer: "/>
<process ref="TransformToXML"/>
<to uri ="xslt:mobako.sender.xsl"/>
<to uri ="websphere-mq:queue:LSMH.ZKSEAP.SERVICEBUS"/>
</route>
<route>
<from uri="websphere-mq:queue:ZKSEAP.LSMH.SERVICEBUS"/>
<to uri="stream:out"/>
</route>
</camelContext>
When I check the to the wmq, I found out that the wmq has been listening to my process, but it did not get any message.
Then to check if my wmq configuration is right, I tried to change my config.xml into something like this:
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="websphere-mq:queue:ZKSEAP.LSMH.SERVICEBUS"/>
<to uri="stream:out"/>
</route>
</camelContext>
After that I tried to write the message manually to the wmq. And when I tried to run my process, then the message from wmq is writen on my console.
Then, I sum up that, with my configuration, I can get the message from the wmq, but I can not write to wmq.
What is the problem actually? Is there something wrong or missing from my configuration? Thanks so much.
EDITED
Hey, finally I found out what is wrong. The problem is: my jms version not the same with my camel version. But, after I changed the jms version, I got following error (regarding to the wmq) on my server:
2014-06-05 15:14:34,859 [Axis2 Task] ERROR WMQMsg - Expected MQ message format ' MQSTR ', but received 'MQHRF2 '
How to solve it? Thanks again.