I am trying to inject a bean into an extension of the HttpInvokerServiceExporter. I've tried to do this is a standard spring config file like this:
But this gets interpreted as if I were trying to define a service to expose through the DispatcherServlet like this example from Chapter 17 of the docs:Code:<bean id="myHttpInvokerServiceExporter" class="com.blah.common.remoting.MyHTTPInvokerServiceExporter"> <property name="myBean"> <ref bean="myBean"/> </property> </bean>
But this is not what I'm trying to do. Our services are exposed and working fine. I just want to add a bean to the HttpInvokerServiceExporter itself so I can store some temporary data about remote connections and make them accessible to other parts of the application.Code:<bean name="/AccountService" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"> <property name="service" ref="accountService"/> <property name="serviceInterface" value="example.AccountService"/> </bean>
Here is the exception I'm getting on startup:
I've Googled and searched through this forum, but can't find out how I should be doing this. Thanks in advance,Caught exception in main program org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'myHttpInvokerServiceExporter' defined in class path resource [config/commonConfig.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'service' is required
Matt Taylor


Reply With Quote