Author: Ion Constantinescu (EPFL)
Date: March 27, 2001
Java platform: Sun JDK 1.2 Windows
JADE version 2.2
This tutorial describes how to install and use the XML-ACL Codec with JADE. This codec implements the FIPA Specifications no. 71 FIPA ACL Message Representation in XML Specification
In order to install XML-ACL the following steps must be performed:
The default Makefile rules don't take the XML-ACL Codec into account. For handling the compilation process of the XML-ACL Codec you have to use the 'build.xml' ant-file located in the xmlacl directory. The following rules are available:
The current implementation has been tested with the following parsers:
Parser Name | Parser Class |
Crimson | org.apache.crimson.parser.XMLReaderImpl |
Xerces | org.apache.xerces.parsers.SAXParser |
The current configuration uses Crimson as the default parser. So if you don't want to make any changes you just have to download Crimson from the link provided above and make sure it is added to the classpath when starting ( either by including it into the $CLASSPATH environment variable - %CLASSPATH% under windows or by specifing it on the command line ) . Notice that the XML-ACL codec must be launched on all the JADE containers
Here is an example of how you would start the platform assuming that you copied crimson.jar from the initial distribution to the jade/lib directory) :
java -classpath ./lib/jade.jar:./lib/jadeTools.jar:./lib/iiop.jar:./lib/crimson.jar:./add-ons/xmlacl/lib/xmlacl.jar
jade.Boot -aclcodec jamr.jadeacl.xml.XMLACLCodec
( for Unix ) java -classpath .\lib\jade.jar;.\lib\jadeTools.jar;./lib/iiop.jar;.\lib\crimson.jar;.\add-ons\xmlacl\lib\xmlacl.jar
jade.Boot -aclcodec jamr.jadeacl.xml.XMLACLCodec
( for Windows )If you want to use another parser suplementary you have to specify in the command line the system property org.xml.sax.parser as in the following example ( also assuming that you have copied xerces.jar from the initial distribution to the jade/lib directory ) :
java -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -classpath
./lib/jade.jar:./lib/jadeTools.jar:./lib/iiop.jar:./lib/xerces.jar:./add-ons/xmlacl/lib/xmlacl.jar
jade.Boot -aclcodec jamr.jadeacl.xml.XMLACLCodec
( for Unix ) java -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -classpath
.\lib\jade.jar;.\lib\jadeTools.jar;.\lib\iiop.jar;.\lib\xerces.jar;.\add-ons\xmlacl\lib\xmlacl.jar
jade.Boot -aclcodec jamr.jadeacl.xml.XMLACLCodec
( for Windows )e
is the message
envelope): e.setAclRepresentation("fipa.acl.rep.xml.std");