Of course I want to receive javax.jms.Message.
Sorry for that mistake
Interesting question and one that I've not tried before. However, use the following in your action chain:
<action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln"> <property name="printfull" value="true"/> </action>
Dig through the output and hopefully you will find what you need. I suspect the original javax.jms.Message is not available but you could reconstruct it from the ESB Message. Keep in mind that the ESB handles non-JMS message types (File, FTP, WS, HTTP, etc) so it needed a solution that allows for all of those types.
I understand that. But in many solutions, there could be nessesary to use original type of "message" (also in such cases as WS, HTTP or even File or FTP). If original message is transformed into internal esb-message somewhere in provider, maybe providers should also contain some "untransform" method. In fact many of calls could be represented in some standarized way (like JMS in javax.jms.Message). Moreover many external libraries or even some service logics can process only standarized representation of messages because of using that logic (or libraries) in some different modules or components of whole system. Some of that components may not be based on JBoss so we can not demand that they will process JBossESB message types. In my opinion there should be some way (maybe some method in ESB internal message - it could even return only Object type) to transform message into original form.
if the message is serializable, well it should be when sent over wire :-), then you can use your own composer and store the original message in the message body or header.
It is a little bit abusing of the composer mechanism, but if necessary...
Good suggestion. Check out the quickstart called scheduled_services for an example of how to build your own Composer so you have the original JMS message in any form that you like it.