Hessian/Burlap Java Binding Draft Spec
      December 02, 2003
Resin 3.0

Features
Installation
Configuration
Web Applications
IOC/AOP
Resources
JSP
Quercus
Servlets and Filters
Databases
Admin (JMX)
CMP
EJB
Amber
EJB 3.0
Security
XML and XSLT
XTP
JMS
Performance
Protocols
Third-party
Troubleshooting/FAQ

Hessian
Hessian Messaging
Hessian 1.0 spec
Hessian 2.0 draft spec
Java Binding
Burlap
Burlap 1.0 Spec
Burlap Design Notes
Tutorials
Hessian 2.0 draft spec
Protocols
Burlap

  1. Introduction
  2. Java to Burlap/Hessian
  3. Method overloading
  4. Burlap to Java
  5. Changes
    1. v3 changes (2001-12-27)
    2. v2 changes

Introduction

Burlap and Hessian use type names in two contexts:

  • as <type> values for lists and objects.
  • as mangled names for method overloading

The mapping from a language's types to the Burlap/Hessian names is necessarily language dependent, but designed for cross-language use.

Java to Burlap/Hessian

The mapping of specific Java types to Burlap/Hessian is relatively straightforward. A Java implementation will also use this mapping when it's parsing and knows the type of the object. Contrast that with the Burlap to Java mapping. Note that XML DOM is mapped to a string.

JavaBurlap
nullnull
Stringstring
booleanboolean
byteint
shortint
intint
longlong
floatdouble
doubledouble
charstring
Booleanboolean
Byteint
Shortint
Integerint
Longlong
Floatdouble
Doubledouble
Characterstring

JavaBurlap
Stringstring
StringBufferstring
char[]string
org.w3c.dom.Nodestring
byte[]base64
Object[][object

JavaBurlap
Datedate
Listlist
Vectorlist
Mapmap
HashMapmap
Hashtablemap
Objectmap (with serialization)
EJBHomeremote (using HomeHandle)
EJBObjectremote (using Handle)

Note: Some of these conversions are lossy. For example, a Byte object serialized and then deserialized will become an Integer. This is the price paid working with other languages.

Method overloading

Java-based servers typically expose three overloaded methods:

  • The simple method name, which corresponds to the shorted overloaded method.
  • The method name with the number of arguments appended, e.g. add__2.
  • The method name with the Burlap/Hessian types, e.g. add_int_int

In this case, all of "add" , "add__2", and "add_int_int" will map to the same method. The client will use whichever is appropriate to its capabilities. For example, many scripting languages can only handle the number of arguments as a mangling technique.

Burlap to Java

In several cases, a Java parser may know nothing about the expected type. For example, an method's argument might be Object or the serialized data may be in a Vector, or a client may not specify the type for a <map>.

BurlapJava
nullnull
booleanBoolean
intInteger
doubleDouble
stringString
dateDate
base64byte []
listArrayList
mapHashMap

Changes

v3 changes (2001-12-27)

  • Change ;ejbid= to ?ejbid=

v2 changes

  • Change SML-RPC to Burlap

Hessian 2.0 draft spec
Protocols
Burlap
Copyright © 1998-2006 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark, and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.