sysContext = ListenerManager.configurationContext;
}
//we will assume a Service and operations
QName assumedServiceName = new QName("AnonymousService");
ServiceDescription axisService = new ServiceDescription(assumedServiceName);
operationTemplate = new OperationDescription(new QName("TemplateOperation"));
// ServiceGroupDescription serviceGroupDescription = new ServiceGroupDescription(sysContext.getAxisConfiguration());
PhasesInfo info =((AxisConfigurationImpl)sysContext.getAxisConfiguration()).getPhasesinfo();
//to set the operation flows
if(info != null){
info.setOperationPhases(operationTemplate);
}
axisService.addOperation(operationTemplate);
sysContext.getAxisConfiguration().addService(axisService);
// serviceGroupDescription.addService(axisService);
// serviceGroupDescription.getServiceGroupContext(sysContext);
// serviceGroupDescription.setServiceGroupName(assumedServiceName.getLocalPart());
// sysContext.getAxisConfiguration().addServiceGroup(serviceGroupDescription);
// return sysContext.createServiceContext(assumedServiceName);
return axisService.getParent().getServiceGroupContext(sysContext).getServiceContext(assumedServiceName.getLocalPart());
// return serviceGroupDescription.getServiceGroupContext(sysContext).getServiceContext(
// assumedServiceName.getLocalPart());
}