if (referenceMessage.getServiceGroupContext()!=null) {
newMessageContext.setServiceGroupContext(referenceMessage.getServiceGroupContext());
newMessageContext.setServiceGroupContextId(referenceMessage.getServiceGroupContextId());
} else {
ServiceGroupContext serviceGroupContext = new ServiceGroupContext (
configContext,referenceMessage.getAxisServiceGroup());
newMessageContext.setServiceGroupContext(serviceGroupContext);
}
} else {
AxisServiceGroup axisServiceGroup = new AxisServiceGroup(axisConfiguration);
ServiceGroupContext serviceGroupContext = new ServiceGroupContext(configContext, axisServiceGroup);
newMessageContext.setAxisServiceGroup(axisServiceGroup);
newMessageContext.setServiceGroupContext(serviceGroupContext);
}
if (referenceMessage.getAxisService() != null) {
newMessageContext.setAxisService(referenceMessage.getAxisService());
if (referenceMessage.getServiceContext()!=null) {
newMessageContext.setServiceContext(referenceMessage.getServiceContext());
newMessageContext.setServiceContextID(referenceMessage.getServiceContextID());
} else {
ServiceGroupContext sgc = newMessageContext.getServiceGroupContext();
ServiceContext serviceContext = sgc.getServiceContext(referenceMessage.getAxisService());
newMessageContext.setServiceContext(serviceContext);
}
}
newMessageContext.setAxisOperation(operation);