// create a test synapse context
TestMessageContext synCtx = new TestMessageContext();
SynapseConfiguration testConfig = new SynapseConfiguration();
testConfig.setRegistry(new SimpleURLRegistry());
synCtx.setEnvironment(new Axis2SynapseEnvironment(testConfig));
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);
synCtx.setEnvironment(new Axis2SynapseEnvironment(
new ConfigurationContext(new AxisConfiguration()), testConfig));
SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
OMDocument omDoc = OMAbstractFactory.getSOAP11Factory().createOMDocument();
omDoc.addChild(envelope);