Dashboard > RIFE > ... > Webservices > Support for Hessian web services > Information > Page Comparison
RIFE Log In   View a printable version of the current page.
Support for Hessian web services


Version 4 by Geert Bevin
on Mar 02, 2005 09:46.


compared with
Current by Dan Check
on Jan 04, 2007 18:27.

(show comment)
 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 2 changes. View first change.

  
  
 I stumbled into [Caucho's Binary Web Service Protocol|http://caucho.com/hessian] which seems very nice for communication between internal application parts. It has been integrated into RIFE in a similar way as SOAP with Axis. There is no concept of auto-deployment through jws files though. To declare a Hessian element you just have to do this, for example:
  
 {code:xml}
 <element extends="rife/webservices/hessian.xml">
  <property name="service-class">my.hessian.Basic</property>
 </element>
 {code}
  
 With the following Java source classes:
  
 {code:java}
 package my.hessian;
  
 public interface BasicApi
 {
  public String hello();
 }
 {code}
  
 and:
  
 {code:java}
 package my.hessian;
  
 public class Basic implements BasicApi
 {
  public String hello()
  {
  return "Hello, world";
  }
 }
 {code}
  
 Assuming that your element is registered in the site structure like this:
  
 {code:xml}
 <site>
  <element id="BASIC" file="my/hessian/basic.xml" url="/basic"/>
 </site>
 {code}
  
 You'll be able to use the web service like this:
  
 {code:java}
 String url = "http://localhost:8080/basic";
 HessianProxyFactory factory = new HessianProxyFactory();
 BasicApi basic = (BasicApi)factory.create(BasicApi.class, url);
 System.out.println(basic.hello());
 {code}
  
 Which will print
 {noformat}Hello, world{noformat}
 to the standard output.
  
 Pretty easy, no?
  
 Please note that RIFE v. 1.5.1 is compatible with Hessian versions up to and including 3.0.19. The 3.0.19 Hessian jar can be downloaded here: http://caucho.com/hessian/download/hessian-3.0.19.jar


Are you enjoying Confluence? Please consider purchasing it today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.1a Build:#515 May 19, 2006) - Bug/feature request - Contact Administrators