KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > providers > soap > MethodFixInterceptor


1 /*
2  * $Id: MethodFixInterceptor.java 3798 2006-11-04 04:07:14Z aperepel $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.providers.soap;
12
13 import org.mule.interceptors.EnvelopeInterceptor;
14 import org.mule.umo.Invocation;
15 import org.mule.umo.UMOException;
16 import org.mule.config.MuleProperties;
17
18 /**
19  * This Interceptor decorates the current message with a property that tells the
20  * DynamicEntryPointResolver to ignore the 'method' property. The reason being is
21  * that for the SOAP endpoints have an additional hop - http --->
22  * AxisServiceComponent ---> WebService the 'method' param is targetted for the
23  * WebService not the AxisServiceComponent, so we eed to ignore it
24  */

25 public class MethodFixInterceptor extends EnvelopeInterceptor
26 {
27
28     public void before(Invocation invocation) throws UMOException
29     {
30         invocation.getMessage().setProperty(MuleProperties.MULE_IGNORE_METHOD_PROPERTY, new Boolean JavaDoc(true));
31     }
32
33     public void after(Invocation invocation) throws UMOException
34     {
35         if (invocation.getMessage() != null)
36         {
37             invocation.getMessage().removeProperty(MuleProperties.MULE_IGNORE_METHOD_PROPERTY);
38         }
39     }
40 }
41
Popular Tags