Reputation: 39
I am passing java object from JMS sender client to mirth.Java Class look like this:
public class OrderDetails implements Serializable{
private static final long serialVersionUID = -4617153110762983450L;
private Long mrn;
private Long orderNo;
private Long patientId;
private Long orderId;
private Long encounterId;
}
JMS client code looks like this:
public void sendMessage(final OrderDetails orderDetails) throws JMSException {
LOG.debug("Starting sendMessage of AMQMsgSenderService");
jmsTemplate.send(new MessageCreator() {
public Message createMessage(Session session) throws JMSException {
LOG.info("SENDING: " + orderDetails);
ObjectMessage message = session.createObjectMessage( orderDetails );
return message;
}
});
LOG.debug("Ending sendMessage of AMQMsgSenderService");
}
Connector Type in Mirth is JMS Reader. I want to receive java object in source and transform into XML or JavaScript Object. Is it possible in Mirth?I am using Mirth Version 2.2.1.5861.
Upvotes: 1
Views: 1095
Reputation: 940
I may suggest one of possible solutions, that is tested under the Mirth Connect v3.0. I’m hoping it should work under the v2.2 as well. Basically, you are moving on in the right direction, possible steps to complete are:
On the receiver side do the same in a reverse order:
Hope this helps.
(Ps. All steps described above in detail, with screenshots and code snippets, for a case where both sender and receiver are Mirth channels, are given in the “Unofficial Mirth Connect developer’s guide”. Disclaimer: I’m the author of this book so any comments or suggestions are welcome.)
Upvotes: 1