1 17 package org.apache.servicemix.soap; 18 19 import java.util.HashMap ; 20 import java.util.Map ; 21 22 import org.apache.servicemix.soap.marshalers.SoapMessage; 23 24 30 public class Context { 31 32 public static final String SOAP_IN = "org.apache.servicemix.SoapIn"; 33 public static final String SOAP_OUT = "org.apache.servicemix.SoapOut"; 34 public static final String SOAP_FAULT = "org.apache.servicemix.SoapFault"; 35 public static final String INTERFACE = "org.apache.servicemix.Interface"; 36 public static final String OPERATION = "org.apache.servicemix.Operation"; 37 public static final String SERVICE = "org.apache.servicemix.Service"; 38 public static final String ENDPOINT = "org.apache.servicemix.Endpoint"; 39 40 public static final String AUTHENTICATION_SERVICE = "org.apache.servicemix.AuthenticationService"; 41 public static final String KEYSTORE_MANAGER = "org.apache.servicemix.KeystoreManager"; 42 43 private Map properties; 44 45 public Context() { 46 this.properties = new HashMap (); 47 } 48 49 public SoapMessage getInMessage() { 50 return (SoapMessage) getProperty(SOAP_IN); 51 } 52 53 public SoapMessage getOutMessage() { 54 return (SoapMessage) getProperty(SOAP_OUT); 55 } 56 57 public SoapMessage getFaultMessage() { 58 return (SoapMessage) getProperty(SOAP_FAULT); 59 } 60 61 public void setInMessage(SoapMessage message) { 62 setProperty(SOAP_IN, message); 63 } 64 65 public void setOutMessage(SoapMessage message) { 66 setProperty(SOAP_OUT, message); 67 } 68 69 public void setFaultMessage(SoapMessage message) { 70 setProperty(SOAP_FAULT, message); 71 } 72 73 public Object getProperty(String name) { 74 return properties.get(name); 75 } 76 77 public void setProperty(String name, Object value) { 78 properties.put(name, value); 79 } 80 81 } 82 | Popular Tags |