Not with ODE's MessageExchangeInterceptor, I don't. I wanted to use the MessageExchangeInterceptor to hook onto partnerlink exchanges but it looks like it is only fully implemented on the experimental 2.X branch. I do have two options I have used to do something similar: Use the ODE MessgeMapper and subclass one of the several available to audit/monitor/enhance the messages to/from ODE Under Servicemix 4, use a MessageExchangeListener to audit message flow to/from ODE endpoints. I believe there is an example in Servicemix 4 you can find under $SMX/examples/interceptors/exchange. I know that external or NMR partner link messages would be caught by such an interceptor, but an ODE-to-ODE exchange would not (since it uses peer-2-peer messaging, which could be optionally turned off with your deploy.xml settings). >>> Joni Lee <[email protected]> 1/14/2011 4:25 AM >>> Hi Kurt, Thank you for replying me. Then.. do you have any experiences so far how we can intercept the messages originating from partner service back to the BPEL process? Any ideas may help me to develop. Best Regards
--- On Thu, 1/13/11, Kurt Westerfeld <[email protected]> wrote: From: Kurt Westerfeld <[email protected]> Subject: Re: Fun with MessageExchange Intercept To: [email protected] Date: Thursday, January 13, 2011, 6:59 PM I believe onPartnerInvoked is never called on the 1.3.X codebase >>> Joni Lee <[email protected]> 1/13/2011 12:52 PM >>> I've found out that the method onPartnerInvoked has never been called when the BPEL process receives a fault message from the external web service (for example, in my case is "Authentication of Username Password Token Failed"), while other methods (onNewInstanceInvoked, onProcessInvoked) have been called sucessfully. How can this be? Solution? Thank you!Best Regards --- On Thu, 1/13/11, Joni Lee <[email protected]> wrote: From: Joni Lee <[email protected]> Subject: Fun with MessageExchange Intercept To: [email protected] Date: Thursday, January 13, 2011, 4:29 PM Hi all, Here I tried some fun to intercept the message exchange routing from the external service back to the process with a small class as follows ------------------- public class FaultInterceptor implements MessageExchangeInterceptor{ private static final Log LOG = LogFactory.getLog(FaultInterceptor.class); @Override public void onPartnerInvoked(PartnerRoleMessageExchange mex, InterceptorContext itc) throws FailMessageExchangeException, FaultMessageExchangeException { LOG.debug("blablabla"); /* ONLY INTERCEPT THE RESPONSE MESSAGE COMING FROM WS */ if (mex.getStatus() == Status.RESPONSE){ Message m = mex.getResponse(); m.setHeaderPart("customeheader", "content"); throw new FaultMessageExchangeException("MycustomeFault", mex.getCaller(), m); } }...} ----------------- First, ODE log says it registered the implementation class successfully. I want to write something to prove that I can really intercept the message. Question: after invoke an external web service.. - Neiter the echo text "blablabla" nor "MycustomeFault" are printed out in log file of ODE. And WHY?- I want to modify the header of the "mex", but it doesn't seem right. Please give me some advices to throw out a message of my own. Thank you very much
