Hi, i am learning JBoss 7.1.1 OSGi Bundle mechanism. I have created two very basic example bundles: a HelloWorldService and a HelloWorld which makes requests to HelloWorldService. Everything is ok when the bundles are deployed on JBoss, and the result is as expected.
But then, i tried to expose the HelloWorldService using the following code
public class HelloServiceActivator implements BundleActivator {
ServiceRegistration helloServiceRegistration;
public void start(BundleContext context) throws Exception {
HelloService helloService = new HelloServiceImpl();
Dictionary props = new Hashtable();
props.put("service.exported.interfaces", "*");
props.put("service.exported.configs", "org.apache.cxf.ws");
props.put("org.apache.cxf.ws.address", "http://localhost:8090/soap");
helloServiceRegistration = context.registerService(HelloService.class.getName(), helloService, props);
}
public void stop(BundleContext context) throws Exception {
helloServiceRegistration.unregister();
}
Then i got this error
Problem accessing /soap. Reason:
Not Found
Powered by Jetty://
And in JBoss log i have this...
23:25:21,832 DEBUG [org.ops4j.pax.web.service.spi.model.ServerModel] (qtp62372644-134 - /soap?wsdl) Matching [/soap]...
23:25:21,832 DEBUG [org.ops4j.pax.web.service.spi.model.ServerModel] (qtp62372644-134 - /soap?wsdl) Path [/soap] does not match any context
I have tried a few things but i could not make it work in JBoss AS 7.1.1
Under my eclipse IDE when i run this same example i can see the Service exposed and working as expected.
Therefore my qestions are : Am i missing some capabilities activation in the standalone.xml file ? What should be there ? CXF bundles ? OSGi bundles ? What do i need to install or activate in JBoss to make sure the OSGi services register also as SOAP or REST Services ?
I am trying to achieve this http://cxf.apache.org/distributed-osgi-greeter-demo-walkthrough.html but i had no success in JBoss 7.1.1 although i was able to do it under the Eclipse IDE.
Any help is apreciated...
Yes, this is a valid feature request. Please monitor WFLY-1280