1 16 package test.properties; 17 18 import org.apache.axis.AxisFault; 19 import org.apache.axis.MessageContext; 20 import org.apache.axis.handlers.BasicHandler; 21 22 34 public class PropertyHandler extends BasicHandler { 35 private String propVal; 36 37 public void invoke(MessageContext msgContext) throws AxisFault { 38 propVal = msgContext.getStrProp(TestScopedProperties.PROP_NAME); 40 41 msgContext.setProperty(TestScopedProperties.OVERRIDE_NAME, 43 TestScopedProperties.OVERRIDE_VALUE); 44 } 45 46 public String getPropVal() { 47 return propVal; 48 } 49 50 public void setPropVal(String propVal) { 51 this.propVal = propVal; 52 } 53 54 public String testScopedProperty() throws Exception { 55 MessageContext context = MessageContext.getCurrentContext(); 56 String propVal = context.getStrProp(TestScopedProperties.PROP_NAME); 57 return propVal; 58 } 59 60 public String testOverrideProperty() throws Exception { 61 MessageContext context = MessageContext.getCurrentContext(); 62 String propVal = context.getStrProp(TestScopedProperties.OVERRIDE_NAME); 63 return propVal; 64 } 65 } 66 | Popular Tags |