here's the error messages that I'm receiving when I run my client spring app.
from here, server's side configsCode:Exception in thread "main" org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [http://localhost:8032/webproj/app/getRemoteResult]; nested exception is java.io.StreamCorruptedException: invalid stream header: 0D0A0D0A at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:211) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:144) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy0.setHello(Unknown Source) at xyz.HelloClient.main(HelloClient.java:19) Caused by: java.io.StreamCorruptedException: invalid stream header: 0D0A0D0A at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
from here, client's side configsCode:<!-- Maps flow requests from DispatcherServlet to flowController --> <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <value> <![CDATA[ /app/remoting/getRemoteResult=httpHelloService ]]> </value> </property> <property name="alwaysUseFullPath" value="true"></property> <property name="order" value="0"/> </bean> <bean id="httpHelloService" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"> <property name="service" ref="helloService"></property> <property name="serviceInterface" value="xyz.service.simulation.HelloService"></property> </bean> <bean id="helloService" class="xyz.service.simulation.impl.HelloServiceImpl"> </bean>
please guide me on how to use spring remoting..Code:<bean id="helloservice" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean"> <property name="serviceUrl" value="http://localhost:8032/webproj/app/remoting/getRemoteResult"></property> <property name="serviceInterface" value="xyz.client.service.HelloService"></property> </bean>
right now, I am testing my small java application by running from eclipse ide.. but...
my ultimate goal is create a jar to call via applet in my webapp to output a graph create from jfreechart..



Reply With Quote