synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asankha C. Perera" <asan...@apache.org>
Subject Re: Class Mediator Exception after task schedule
Date Fri, 27 Mar 2009 03:40:04 GMT
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message