getAxisServer().getClassCache()
.registerClass(serviceObj.getClass().getName(),
serviceObj.getClass());
ObjectSOAPService soapService =
new ObjectSOAPService(axisServer,serviceName,serviceObj,
classes,
allowedMethods);
soapService.deploy();
exportedServices.put(sr, soapService);
}
}
break;
case ServiceEvent.UNREGISTERING:
{
ServiceReference sr = event.getServiceReference();
String serviceName = (String) sr.getProperty(AxisAdmin.SOAP_SERVICE_NAME);
if (serviceName != null) {
ObjectSOAPService soapService
= (ObjectSOAPService)exportedServices.get(sr);
if(soapService != null) {
Object serviceObj = soapService.getServiceObject();
getAxisServer().getClassCache()
.deregisterClass(soapService.getClass().getName());
soapService.undeploy();
log.info("removed service "+serviceName);
exportedServices.remove(sr);
}