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 {
ServiceContext serviceContext = new ServiceContext (referenceMessage.getAxisService(),newMessageContext.getServiceGroupContext());
newMessageContext.setServiceContext(serviceContext);
}
} else {
AxisService axisService = new AxisService("AnonymousRMService");
AxisServiceGroup serviceGroup = newMessageContext.getAxisServiceGroup();
axisService.setParent(serviceGroup);
serviceGroup.addChild(axisService);
ServiceContext serviceContext = new ServiceContext(axisService, newMessageContext.getServiceGroupContext());
newMessageContext.setAxisService(axisService);
newMessageContext.setServiceContext(serviceContext);