if (osgiSRindex < 0)
return;
try {
String filter = path.substring(osgiSRindex + 8);
String serviceName = "OSGi-SR:" + filter;
WSDDEngineConfiguration config = (WSDDEngineConfiguration) msgContext.getAxisEngine()
.getConfig();
WSDDDeployment deployment = config.getDeployment();
WSDDService ws = findService(deployment, serviceName);
SOAPService service = null;
if (ws == null) {
BundleContext bContext = org.knopflerfish.bundle.axis.Activator.axisBundle;
Object serviceObject = null;
String sfilter = "(" + filter + ")";
ServiceReference[] srs = bContext.getServiceReferences(null,
sfilter);
serviceObject = bContext.getService(srs[0]);
String addDoc = deploymentWSDD(serviceWSDD(serviceName,
serviceObject.getClass().getName()));
WSDDDocument doc = new WSDDDocument(XMLUtils.newDocument(new ByteArrayInputStream(addDoc.getBytes())));
doc.deploy(deployment);
msgContext.getAxisEngine().refreshGlobalOptions();
deployment = config.getDeployment();
ws = findService(deployment, serviceName);
service = deployment.getService(ws.getQName());
// service.setOption("scope", Scope.APPLICATION_STR);
msgContext.getAxisEngine().getApplicationSession().set(serviceName,
serviceObject);