Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Apache Felix, Spring DM, JAX-WS Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Apache Felix, Spring DM, JAX-WS

    Hello,
    im trying to expose an osgi service also as a web service. The osgi service is accessible but the web service is not started.

    My Bean Configuration:
    <bean id="ReverseStringABC" class="com.net.osgi.spring.impl.ReverseStringBean" />
    <osgi:service ref="ReverseStringABC" interface="com.net.osgi.spring.ReverseString">
    <osgi:service-properties>
    <entry key="Key1" value="aStringValue" />
    <entry key="Key2" value="anOtherStringValue" />
    </osgi:service-properties>
    </osgi:service>

    <bean class="org.springframework.remoting.jaxws.SimpleJa xWsServiceExporter">
    <property name="baseAddress" value="http://localhost:8080/" />
    </bean>
    <bean id="ReverseStringWS" class="com.net.osgi.spring.ws.ReverseStringEndpoin t">
    </bean>

    The Log:
    27.08.2009 11:46:47 org.springframework.context.support.AbstractApplic ationContext prepareRefresh
    INFO: Refreshing org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext@1f09a31: display name [OsgiBundleXmlApplicationContext(bundle=com.net.osg i.spring.ReverseString, config=osgibundle:/META-INF/spring/*.xml)]; startup date [Thu Aug 27 11:46:47 CEST 2009]; root of context hierarchy
    27.08.2009 11:46:47 org.springframework.osgi.context.support.AbstractO sgiBundleApplicationContext unpublishContextAsOsgiService
    INFO: Unpublishing application context OSGi service for bundle ReverseString (com.net.osgi.spring.ReverseString)
    27.08.2009 11:46:47 org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
    INFO: Loading XML bean definitions from URL [bundle://14.3:0/META-INF/spring/reversestring-osgi.xml]
    27.08.2009 11:46:47 org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
    INFO: Loading XML bean definitions from URL [bundle://14.3:0/META-INF/spring/reversestring.xml]
    27.08.2009 11:46:47 org.springframework.context.support.AbstractApplic ationContext obtainFreshBeanFactory
    INFO: Bean factory for application context [org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext@1f09a31]: org.springframework.beans.factory.support.DefaultL istableBeanFactory@d51a54
    27.08.2009 11:46:47 org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor stageOne
    INFO: No outstanding OSGi service dependencies, completing initialization for OsgiBundleXmlApplicationContext(bundle=com.net.osg i.spring.ReverseString, config=osgibundle:/META-INF/spring/*.xml)
    27.08.2009 11:46:47 org.springframework.beans.factory.support.DefaultL istableBeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@d51a54: defining beans [ReverseStringABC,org.springframework.osgi.service. exporter.support.OsgiServiceFactoryBean#0,org.spri ngframework.remoting.jaxws.SimpleJaxWsServiceExpor ter#0,ReverseStringWS,reverseBean]; root of factory hierarchy
    27.08.2009 11:46:47 org.springframework.osgi.service.exporter.support. OsgiServiceFactoryBean registerService
    INFO: Publishing service under classes [{com.net.osgi.spring.ReverseString}]
    27.08.2009 11:46:47 com.sun.xml.internal.ws.model.RuntimeModeler getRequestWrapperClass
    INFO: Dynamically creating request wrapper Class com.net.osgi.spring.ws.jaxws.Reverse
    27.08.2009 11:46:47 com.sun.xml.internal.ws.model.RuntimeModeler getResponseWrapperClass
    INFO: Dynamically creating response wrapper bean Class com.net.osgi.spring.ws.jaxws.ReverseResponse
    27.08.2009 11:46:47 org.springframework.osgi.context.support.AbstractO sgiBundleApplicationContext publishContextAsOsgiServiceIfNecessary
    INFO: Publishing application context as OSGi service with properties {org.springframework.context.service.name=com.net. osgi.spring.ReverseString, Bundle-SymbolicName=com.net.osgi.spring.ReverseString, Bundle-Version=1.0.0}
    27.08.2009 11:46:47 org.springframework.osgi.extender.internal.support .DefaultOsgiBundleApplicationContextListener onOsgiApplicationEvent
    INFO: Application context successfully refreshed (OsgiBundleXmlApplicationContext(bundle=com.net.os gi.spring.ReverseString, config=osgibundle:/META-INF/spring/*.xml))

    There are some objects for the web service created but the web service is not reachable (started) I think.

    Any hint is welcome.

    Felix

  • #2
    Felix, from the logs it looks like the bundle and its context have started just fine. Why your service is not available, I can't tell.
    Try the web services piece first outside OSGi and once it works there, try to slowly migrate it to OSGi.
    From your post, the OSGi side of things looks good.

    Comment

    Working...
    X