}
public static Axis2MessageContext getAxis2MessageContext(String bodyText,
Map props) throws Exception {
// create a test synapse context
SynapseConfiguration testConfig = new SynapseConfiguration();
org.apache.axis2.context.MessageContext inContext =
new org.apache.axis2.context.MessageContext();
Axis2MessageContext synCtx = new Axis2MessageContext(inContext, testConfig, null);
testConfig.setRegistry(new SimpleURLRegistry());
if (props != null) {
Iterator iter = props.keySet().iterator();
while (iter.hasNext()) {
String key = (String) iter.next();
testConfig.addEntry(key, (Entry) props.get(key));
}
}
synCtx.setConfiguration(testConfig);
SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();