Hi All,
I am trying the following example, Remoting With Spring to add remoting support to my working application.
I added the following lines to my appcontext.xml
Seems fairly straight forward, but in my client i am trying the following bunch of code,Code:<bean name="/RuleRemote" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"> <property name="service" ref="myRepository"/> <property name="serviceInterface" value="com.MyRepository"/> </bean> <bean id="myRepository" parent="txProxy"> <property name="target"> <bean class="com.MyRepositoryImpl"/> </property> </bean>
However, executing it throws an error, saying Status code 404 was thrown. I guess this must be some basic error. Can someone help me out?Code:HttpInvokerProxyFactoryBean proxy = new HttpInvokerProxyFactoryBean(); proxy.setServiceUrl( "http://localhost:8080/myApp/RuleRemote"); proxy.setServiceInterface(RuleRepository.class); try { proxy.afterPropertiesSet(); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } MyRepository repository = (MyRepository) proxy.getObject(); MyRepository.save(rule);
org.springframework.remoting.RemoteAccessException : Cannot access HTTP invoker remote service at [http://localhost:8080/claimprocess/RuleRemote]; nested exception is java.io.IOException: Did not receive successful HTTP response: status code = 404, status message = [/claimprocess/RuleRemote]
java.io.IOException: Did not receive successful HTTP response: status code = 404, status message = [/claimprocess/RuleRemote]


Reply With Quote