Announcement Announcement Module
Collapse
No announcement yet.
Problem consuming remote service proxy through OSGi registry Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem consuming remote service proxy through OSGi registry

    I am trying to consume web service from a Spring Dynamic Module. I have configured the JaxRpcProxy as below and injecting this bean as a reference to the service.ISpringWS intereface in my consumer class. This worked fine.

    ===========The configuration which is working========
    <bean id="jaxRpcProxy"
    class="org.springframework.remoting.jaxrpc.JaxRpcP ortProxyFactoryBean">
    <property name="serviceFactoryClass" value="org.apache.axis.client.ServiceFactory" />
    <property name="wsdlDocumentUrl"
    value="http://localhost:8080/spring_axis/axis/SpringWS?wsdl" />
    <property name="namespaceUri"
    value="http://localhost:8080/spring_axis/axis/SpringWS" />
    <property name="serviceName" value="SpringWSEndPointService" />
    <property name="portName" value="SpringWS" />
    <property name="serviceInterface" value="service.ISpringWS" />
    </bean>

    <bean id="springWSClient" class="client.SpringWSClient">
    <property name="springWS" ref="jaxRpcProxy" />
    </bean>
    ==============================================

    Then I tried to use the jaxRpcProxy through OSGI service registry.
    For that I did the following changes in the configuration.

    1. I declared the osgi:service in a separate xml file.
    2. Create a reference to the service in my initial file and try to use this referece instead of the jaxRpcProxy bean.

    I got the following error.
    The property value 'ServiceWrapper for {service.ISpringWS}={org.springframework.osgi.bean .name=jaxRpcProxy, Bundle-SymbolicName=com.springaxis.client, Bundle-Version=1.0.0, service.id=169}', specified in the definition of bean 'springWSClient', could not be converted to the required type 'interface service.ISpringWS'.

    Any suggestions ?

    ============Configuration which is not working=========

    <osgi:service id="springWS" ref="jaxRpcProxy" interface="service.ISpringWS"></osgi:service>

    <osgi:reference id="springWS" interface="service.ISpringWS"></osgi:reference>

    <bean id="springWSClient" class="client.SpringWSClient">
    <property name="springWS" ref="springWS" />
    </bean>
Working...
X