Oct 22nd, 2009, 01:08 AM
How to wrap message with soap envelope
I have a JMS based webservice, for which I am using SaajSoapMessageFactory, SoapMessageDispatcher, PayloadRootQNameEndpointMapping & XmlBeansMarshaller.
When I put a soap message onto the queue, the invokeInternal method of my endpoint gets invoked and I get the soap message converted to an Object, note I am using XmlBeansMarshaller.
When the message is received I perform some operations on the message and wants the message to be sent back to the queue, if I call toString method on the Object that I receive as a message it gives me a string with the Soap Envelope tags removed, but I want the message to be sent back to the queue along with the Soap Envelope tags.
How do I wrap this message with Soap Envelope tags ? Will using the WebServiceTemplate with JmsMessageSender, wrap the message with Soap Envelope tags automatically ?
Oct 22nd, 2009, 07:06 AM
WebServiceTemplate should wrap the message in a soap envelope for you.
Oct 22nd, 2009, 07:30 AM
I tried with WebServiceTemplate, I was able to send the message to the queue, but the message text was not displayed in ActiveMQ web console, I dont know in which format the message was sent.
I want the message to be in text format along with the soap envelope tags. Any Idea ?
Oct 22nd, 2009, 07:54 AM
Did you try a packet sniffer to capture the message and check the contents? I haven't worked much on ActiveMQ, so cannot help much here.