PDA

View Full Version : Using services exported via HttpInvoker through a 'Springless' app.



JSRamos
Jan 13th, 2006, 02:01 PM
Hi all.

Is there a way to make use of services exported with HttpInvokerServiceExporter in a 'spring-less' application?

My app has some services exposed with RMI and HttpInvoker, and now a legacy app has to make use of these, but the other developers will not be using spring to power-up their legacy app.

Please, help! Spring's survival in my company depends on this little issue!

Thanks.

J.

jwray
Jan 13th, 2006, 10:50 PM
J.

There's nothing to stop you from wiring up the spring beans in the legacy application programmatically. They are just java objects after all.

So instead of


<bean id="httpInvokerProxy" class="org.sprfr.remoting.httpinvoker.HttpInvokerProxyFac toryBean">
<property name="serviceUrl" value="http://remotehost:8080/AccountService"/>
<property name="serviceInterface" value="example.AccountService"/>
</bean>

you could do


HttpInvokerProxyFactoryBean factory = new HttpInvokerProxyFactoryBean();
factory.setServiceUrl("http://remotehost:8080/AccountService");
factory.setServiceInterface(AccountService.class);


in the code used by the application that can't use spring for wiring.

Jonny


Hi all.

Is there a way to make use of services exported with HttpInvokerServiceExporter in a 'spring-less' application?

My app has some services exposed with RMI and HttpInvoker, and now a legacy app has to make use of these, but the other developers will not be using spring to power-up their legacy app.

Please, help! Spring's survival in my company depends on this little issue!

Thanks.

J.