Just looking over your code; what is the example of when headers is NOT an instanceof Map. When could this happen ? If this is true then it's a problem for the system; should raise an exception ?
Kim -----Original Message----- From: Asankha Perera [mailto:[email protected]] On Behalf Of Asankha C. Perera Sent: Friday, 27 March 2009 2:40 PM To: [email protected] Subject: Re: Class Mediator Exception after task schedule Hi Kim > Are there any examples of code where I could do the send of the message in the > Java task code; create a new messageInjectorSenderMediator ? > So add the transport info then do the send. > Hope this helps: Axis2MessageContext axis2smc = (Axis2MessageContext) synCtx; org.apache.axis2.context.MessageContext axis2MessageCtx = axis2smc.getAxis2MessageContext(); Object headers = axis2MessageCtx.getProperty( org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS); if (headers != null && headers instanceof Map) { Map headersMap = (HashMap) headers; headersMap.put(name, resultValue); // <== adding a transport header } if (headers == null) { Map headersMap = new HashMap(); headersMap.put(name, resultValue); // <== adding a transport header axis2MessageCtx.setProperty( org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS, headersMap); } > If I send this to a Synapse Proxy then the real sequence is out of Quartz scope. > Yes.. but its like going out around and coming back in :) cheers asankha -- Asankha C. Perera AdroitLogic, http://adroitlogic.org http://esbmagic.blogspot.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
