// throws excpetion if name is invalid
assertServiceName(serviceName);
Object serviceObj = bc.getService(sr);
ObjectSOAPService oss = new ObjectSOAPService(null, serviceName, serviceObj, classes, allowedMethods);
exportedServices.put(sr, oss);
soapServlet.publishInstance("/" + serviceName, serviceObj);
soapServlet.publishClass(serviceObj.getClass(), null);
}
}
break;
case ServiceEvent.UNREGISTERING:
{
ServiceReference sr = event.getServiceReference();
String serviceName = (String) sr.getProperty(KSoapAdmin.SOAP_SERVICE_NAME);
if (serviceName != null) {
ObjectSOAPService soapService
= (ObjectSOAPService)exportedServices.get(sr);
if(soapService != null) {
Object serviceObj = soapService.getServiceObject();
}
}
}
break;