I'm studying the Hessian on resin.
According to the after page,I build the Hessian's client and server.
http://hessian.caucho.com/doc/hessian-overview.xtp#Hessian%20Service

Client-side use hessian-3_2-snap.jar,Sever-side use Resin-3.2.1

when I run my Client-side, shrow following Exception:
Exception in thread "main"
com.caucho.hessian.client.HessianRuntimeException:
com.caucho.hessian.io.HessianProtocolException: expected hessian reply at
0x48 (H)
HHello, world
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:232)
 at $Proxy0.hello(Unknown Source)
 at example.BasicClient.main(BasicClient.java:14)
Caused by: com.caucho.hessian.io.HessianProtocolException: expected hessian
reply at 0x48 (H)
HHello, world
    at com.caucho.hessian.io.Hessian2Input.error(Hessian2Input.java:2705)
 at com.caucho.hessian.io.Hessian2Input.startReply(Hessian2Input.java:402)
 at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:218)
 ... 2 more


the correct result: *Hello, world*,but the running result is* **HHello,
world.*
there is messy code before *Hello,word.*
**
the following source is my client tip and sever tip's source.

package example;
import com.caucho.hessian.client.HessianProxyFactory;
public class BasicClient {
  public static void main(String []args)
    throws Exception
  {
    String url = "http://localhost:8080/hessian/hello";;
    HessianProxyFactory factory = new HessianProxyFactory();
    Basic basic = (Basic) factory.create(Basic.class, url);
    System.out.println(basic.hello());
  }
}


package example;
public class BasicService implements Basic {
  private String _greeting = "Hello, world";
  public void setGreeting(String greeting)
  {
    _greeting = greeting;
  }
  public String hello()
  {
    System.out.println("aaaaaaaaa");
    return _greeting;
  }
}
why do error happen?
thanks!!!

**
_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to