Hi there,

I had tried to run a simple hessian client but I got 500 error:

com.caucho.hessian.client.HessianConnectionException: 500: java.io.IOException
Server returned HTTP response code: 500 for URL:
http://passport.com:8080/remoting/UserService
org.springframework.web.util.NestedServletException: Hessian skeleton
invocation failed;
nested exception is java.io.IOException: expected 'c' in hessian input at 72

My simple client:

public class HessianSimpleClient {
    public static void main(String[] args) throws Exception {
        String url = "http://passport.com:8080/remoting/UserService";;
        HessianProxyFactory factory = new HessianProxyFactory();
        IUserService userService = (IUserService) factory.create(
                IUserService.class, url);
        try {
            userService.login();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Service

public interface IUserService {
    public String login();
}

Service implementation
public class UserService implements IUserService {
    @Override
    public String login() {
        return "====== SUCCESS =====";
    }
}

web.xml
<listener>
      
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
   </listener>

   <servlet>
      <servlet-name>remoting</servlet-name>
      
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
   </servlet>

   <servlet-mapping>
      <servlet-name>remoting</servlet-name>
      <url-pattern>/remoting/*</url-pattern>
   </servlet-mapping>

remoting-servlet.xml
<bean name="/UserService"
    class="org.springframework.remoting.caucho.HessianServiceExporter">
    <property name="service" ref="userService" />
    <property name="serviceInterface" value="server.IUserService" />
 </bean>

 <bean id="userService" class="server.UserService" />

I'm using

resin-4.0.1
jdk-1.6
hessian-4.0.1
spring-2.5.6
spring-web-2.5.6
spring-webmvc-2.5.6
commons-logging-1.1.1

Thanks for any help.


_______________________________________________
hessian-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/hessian-interest

Reply via email to