1 10 11 package org.mule.providers.soap.axis.extras; 12 13 import java.util.HashMap ; 14 import java.util.Iterator ; 15 import java.util.Map ; 16 17 import org.apache.commons.lang.StringUtils; 18 import org.mule.config.MuleProperties; 19 import org.mule.providers.http.HttpConnector; 20 import org.mule.providers.http.HttpConstants; 21 import org.mule.providers.soap.SoapConstants; 22 import org.mule.umo.UMOEventContext; 23 import org.mule.umo.UMOMessage; 24 25 public class AxisCleanAndAddProperties 26 { 27 28 34 public static Map cleanAndAdd(UMOEventContext muleEventContext){ 35 36 Map props = new HashMap (); 37 UMOMessage currentMessage = muleEventContext.getMessage(); 38 final String SOAP_METHODS = "soapMethods"; 39 40 for (Iterator iterator = currentMessage.getPropertyNames().iterator(); iterator.hasNext();) 41 { 42 String name = (String )iterator.next(); 43 if (!StringUtils.equals(name, SOAP_METHODS) 44 && !StringUtils.equals(name, SoapConstants.SOAP_ACTION_PROPERTY) 45 && !StringUtils.equals(name, MuleProperties.MULE_METHOD_PROPERTY) 46 && (!name.startsWith(MuleProperties.PROPERTY_PREFIX) || StringUtils.equals(name, 47 MuleProperties.MULE_USER_PROPERTY)) 48 && !HttpConstants.ALL_HEADER_NAMES.containsValue(name) 49 && !StringUtils.equals(name, HttpConnector.HTTP_STATUS_PROPERTY)) 50 { 51 props.put(name, currentMessage.getProperty(name)); 52 } 53 } 54 return props; 55 } 56 } | Popular Tags |