-
Aug 26th, 2010, 01:47 AM
#1
invalid stream header in spring http invoker
hi,
i am using org.springframework.remoting.httpinvoker.HttpInvok erProxyFactoryBean for accessing the remote url using spring
my bean is
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="httpInvokerProxy" class="org.springframework.remoting.httpinvoker.Ht tpInvokerProxyFactoryBean">
<property name="serviceUrl">
<value>http://staging.ticketgoose.com/bookbustickets/TGWSStationNameResponseAction.do?event=getStationD etails&password=wscts@hub&userId=wsctshubd emo</value>
</property>
<property name="serviceInterface">
<value>com.cyberlinks.http.IStationDetail</value>
</property>
</bean>
</beans>
my class is
public class SpringHelloWorldTest {
public static void main(String[] args) {
XmlBeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("SpringHelloWorld.xml"));
IStationDetail myBean = (IStationDetail) beanFactory.getBean("httpInvokerProxy");
System.out.println(myBean);
myBean.getStationDetails();
}
}
and interface is
public interface IStationDetail {
public String getStationDetails();
}
but get the exception stack as
Aug 26, 2010 12:08:29 PM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [SpringHelloWorld.xml]
HTTP invoker proxy for service URL [http://staging.ticketgoose.com/bookb...=wsctshubdemo]
Exception in thread "main" org.springframework.remoting.RemoteAccessException : Could not access HTTP invoker remote service at [http://staging.ticketgoose.com/bookb...wsctshubdemo]; nested exception is java.io.StreamCorruptedException: invalid stream header: 3C3F786D
at org.springframework.remoting.httpinvoker.HttpInvok erClientInterceptor.convertHttpInvokerAccessExcept ion(HttpInvokerClientInterceptor.java:212)
at org.springframework.remoting.httpinvoker.HttpInvok erClientInterceptor.invoke(HttpInvokerClientInterc eptor.java:145)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy0.getStationDetails(Unknown Source)
at com.cyberlinks.http.SpringHelloWorldTest.main(Spri ngHelloWorldTest.java:22)
Caused by: java.io.StreamCorruptedException: invalid stream header: 3C3F786D
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.<init>(Unknown Source)
at org.springframework.core.ConfigurableObjectInputSt ream.<init>(ConfigurableObjectInputStream.java:47)
at org.springframework.remoting.rmi.CodebaseAwareObje ctInputStream.<init>(CodebaseAwareObjectInputStrea m.java:81)
at org.springframework.remoting.httpinvoker.AbstractH ttpInvokerRequestExecutor.createObjectInputStream( AbstractHttpInvokerRequestExecutor.java:272)
at org.springframework.remoting.httpinvoker.AbstractH ttpInvokerRequestExecutor.readRemoteInvocationResu lt(AbstractHttpInvokerRequestExecutor.java:240)
at org.springframework.remoting.httpinvoker.SimpleHtt pInvokerRequestExecutor.doExecuteRequest(SimpleHtt pInvokerRequestExecutor.java:69)
at org.springframework.remoting.httpinvoker.AbstractH ttpInvokerRequestExecutor.executeRequest(AbstractH ttpInvokerRequestExecutor.java:136)
at org.springframework.remoting.httpinvoker.HttpInvok erClientInterceptor.executeRequest(HttpInvokerClie ntInterceptor.java:192)
at org.springframework.remoting.httpinvoker.HttpInvok erClientInterceptor.executeRequest(HttpInvokerClie ntInterceptor.java:174)
at org.springframework.remoting.httpinvoker.HttpInvok erClientInterceptor.invoke(HttpInvokerClientInterc eptor.java:142)
... 4 more
Please tell me where i am doing wrong.
Thanks in advance
-
Sep 27th, 2010, 02:24 PM
#2
same issue
Hi Nimesh,
I am also getting the same error.
could u pls let me know how u solved it.
Thank u for help....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules