Hi Joni,

first: of course I agree with you that intercepting partner invocations
can be important, especially because the interceptor interface suggest
that this functionality is supported. So this is clearly a bug.

For your scenario however, I think it should be possible to catch that
fault even if it is not declared at the interface, similar to
RuntimeExceptions in Java. If you know the QName of the security fault,
you can try to catch it in a BPEL faulthandler.

Tammo

On 17.01.2011 14:01, Joni Lee wrote:
> Dear Tammo,
> I personally find that it is very important to intercept the message 
> originating from partner web service back to the BPEL process, due to a 
> following scenario:
> - BPEL Process invokes a web service- This service has to check the security 
> SOAP header for authentication.- If fault, JAX WS in the implementation layer 
> of the service returns immediately to ODE with a message fault, before the 
> JAVA programmer of the web service can catch that fault and returns their 
> defined XSD message to BPEL Process.- Because the fault message is undefined 
> in the Schema / WSDL, ODE cannot collaborate with the service, it cannot 
> understand this message.- BPEL Process designer cannot further define their 
> own handler, catch, throw etc..., but only a common system fault is thrown 
> out back to the client.
> What are your opinion?Hope you would reply me and share me your thought.
> Thank you very much
> --- On Fri, 1/14/11, Tammo van Lessen <[email protected]> wrote:
> 
> From: Tammo van Lessen <[email protected]>
> Subject: Re: Fun with MessageExchange Intercept
> To: [email protected]
> Date: Friday, January 14, 2011, 3:15 PM
> 
> Hi Kurt, Joni,
> 
> true, for some unknown reason the call to onPartnerInvoked got lost in
> trunk, i.e. ODE 1.x. Please file a bug for that, it should be easy to
> fix that, but it wont make it into 1.3.5 anymore. I'm currently cutting
> the release candidate.
> 
> Thanks,
>   Tammo
> 
> On 14.01.2011 14:47, Kurt Westerfeld wrote:
>> 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
>>
>>
>>
>>
>>
>>
>>
>>
>>        
>>
>>
>>
>>
>>
>>
>>        
>>
> 

-- 
Tammo van Lessen - http://www.taval.de

Reply via email to