Caucho maker of Resin Server | Application Server (Java EE Certified) and Web Server


 

Resin Documentation

home company blog wiki docs 
app server web server 
health cloud java ee pro 
 Resin Server | Application Server (Java EE Certified) and Web Server
 

hessian binary web service protocol


The Hessian binary web service protocol makes web services usable without requiring a large framework, and without learning yet another alphabet soup of protocols. Because it is a binary protocol, it is well-suited to sending binary data without any need to extend the protocol with attachments.

Hessian Implementations/Download

Caucho Technology has released this Hessian implementation under an open source license (the Apache license). Anyone may freely download, use, and redistribute the Hessian implementation.

wiki

A wiki topic for Hessian is available at http://wiki.caucho.com/Hessian.

Java

Hessian Download
BINARYSOURCETESTDATE
hessian-4.0.37.jar (845k) hessian-4.0.37-src.jar (388k) 2013/09/18
hessian-4.0.7.jar (383k) hessian-4.0.7-src.jar (374k) 2010/05/21
hessian-4.0.6.jar (383k) hessian-4.0.6-src.jar (374k) 2010/04/01
hessian-4.0.3.jar (383k) hessian-4.0.3-src.jar (374k) 2009/11/24
hessian-4.0.1.jar (277k) hessian-4.0.1-src.jar (291k) 2009/07/29
hessian-3.2.1.jar (277k) hessian-3.2.1-src.jar (291k) 2008/10/20
hessian-3.2.0.jar (277k) hessian-3.2.0-src.jar (291k) 2008/08/08
hessian-3.1.6.jar (273k) hessian-3.1.6-src.jar (293k) hessian-test.jar (10k) 2008/05/05
hessian-3.1.5.jar (273k) hessian-3.1.5-src.jar (293k) hessian-test.jar (10k) 2008/02/27
hessian-3.0.20.jar (144k) hessian-3.0.20-src.jar (184k) hessian-test.jar (10k) 2006/08/01
  • Hessian4J - A third-party alternative Java implementation by Bruno Ranschaert and Roger Laenen.
  • Exadel Flamingo features a port of Hessian Java to work on Android.

Python

The Mustaine project has taken over the Python port of Hessian at http://code.google.com/p/mustaine

Hessian (Caucho) Download
VERSIONDATE
hessianlib.py (11k) 2007/09/04

C++

Aldratech's C++ implementation of Hessian is available at Sourceforge.

.NET C#

C# implementation of Hessian is available under the LGPL at Sourceforge by Dimitri Minich, Vitaliy Byelyenkiy and Andre Voltmann.

D

D implementation of Hessian is available at source.org by Radu Racariu.

Erlang

Ben Hood has written a Erlang implementation of Hessian, available at Sourceforge.

PHP

A PHP implementation of Hessian is available under the GPL at Sourceforge by Manolo Gomez.

Ruby

A Ruby Hessian client is available under the LGPL at Sourceforge by Pankaj Mishra.

Christer Sandberg has implemented a Ruby Hessian client at http://rubyforge.org/projects/hessian.

Objective C

  • The Cocoa Cayenne project contains an Objective C implementation of Hessian
  • HessianKit is an Objective C implementation of Hessian that targets Mac OS X 10.5 and the iPhone

Introduction to Hessian

Creating a Hessian service using Java has four steps:

  1. Create an Java interface as the public API
  2. Create a client using HessianProxyFactory
  3. Create the Service implementation class
  4. Configure the service in your servlet engine.

The Service API

A Hessian service's API is just a plain old Java interface.

Hello, World API
public interface BasicAPI {
  public String hello();
}

The Hessian protocol eliminates external API descriptions like CORBA IDL files or WSDL. Documenting a Hessian service API is as simple as providing the JavaDoc. Because Hessian is language-independent, the Java interface classes are not required for non-Java languages. For external languages, the Java interfaces serve only to document the service methods.

Service Implementation

The service implementation can be a plain-old Java object (POJO) or can extend HessianServlet to make the servlet-engine configuration trivial.

Hello, World Service
public class BasicService extends HessianServlet implements BasicAPI {
  private String _greeting = "Hello, world";

  public void setGreeting(String greeting)
  {
    _greeting = greeting;
  }

  public String hello()
  {
    return _greeting;
  }
}

The service implementation can also be a plain-old Java object (POJO), avoiding any dependency on HessianServlet. More details are at Hessian introduction and in the Hessian Service using Dependency Injection tutorial.

Client Implementation

Creating a client is as simple as creating an API interface:

Hello, World Client
String url = "http://hessian.caucho.com/test/test";

HessianProxyFactory factory = new HessianProxyFactory();
BasicAPI basic = (BasicAPI) factory.create(BasicAPI.class, url);

System.out.println("hello(): " + basic.hello());

Examples

Documents

Implementations

LANGUAGEIMPLEMENTATIONAUTHOR
Javahessian.jarCaucho Technology
Pythonhessianlib.pyCaucho Technology

Tests

Developers building Hessian libraries for different languages may use the following public services on www.caucho.com for testing and experimentation.

The tests are also available in the hessian-test.jar download for experimentation.

URLDESCRIPTIONAPI
http://hessian.caucho.com/test/testBasic sanity-checking testsBasicAPI

Mailing Lists

hessian-interest

The hessian-interest contains discussion specific to Caucho's web services protocols: Hessian and Burlap. A hessian-interest archive is also available.

To subscribe, visit http://maillist.caucho.com.

External Links

Wireformat Project: Mule integration

The Wireformat Project, led by Ben Hood, has created a Hessian Mule Transport for the Mule ESB (Enterprise Service Bus) platform.

Dinamica

Technical article about integrating Hessian with our open source J2EE framework "Dinamica"

dinamica-hessian.pdf

The article explains how to return disconnected recordsets (a Dinamica feature) using a Hessian service. In the example, a customer record, all its orders and the detail records for every order are returned using a single recordset and a very simple hessian service.

Former MTS/COM+/VB6 programmers will recognize this technique.

Spring Framework

The Spring Framework includes support for Hessian. The org.springframework.remoting.caucho JavaDoc provides an overview.

RIFE

RIFE aims to offer a viable solution for rapid web application development in Java without being troubled by the complex implications of J2EE. RIFE offers an alternative approach to web application development and design. It builds upon the Java platform, but offers all required tools and APIs to implement and perform all common website related tasks in a fast, intuitive and consistent manner.

RIFE has a page describing its support for Hessian web services.

Apache Cayenne

Apache Cayenne is an ORM tool which supports Hessian for transport of database objects between a client and server.

Benchmarks


Copyright © 1998-2012 Caucho Technology, Inc. All rights reserved. Resin ® is a registered trademark. Quercustm, and Hessiantm are trademarks of Caucho Technology.

Cloud-optimized Resin Server is a Java EE certified Java Application Server, and Web Server, and Distributed Cache Server (Memcached).
Leading companies worldwide with demand for reliability and high performance web applications including SalesForce.com, CNET, DZone and many more are powered by Resin.

home company blog wiki docs 
app server web server 
health cloud java ee pro