FOUNDATION FOR INTELLIGENT
PHYSICAL AGENTS
FIPA Agent Message Transport Envelope Representation in XML
Specification
Document title |
FIPA Agent Message Transport Envelope Representation in XML
Specification |
||
Document number |
PC00085F |
Document source |
FIPA Agent Management |
Document status |
Preliminary |
Date of this status |
2000/08/16 |
Supersedes |
None |
||
Contact |
management@fipa.org |
||
Change history |
|||
2000/05/25 |
Initial draft |
||
2000/06/16 |
Updated the DTD to resolve some ambiguities and updated example accordingly. Replaced href attribute with value. Modified the AID object semantics in order to permit the name field to contain a URL and to clearly specify the name of the user-defined properties. |
||
2000/06/19 |
Added a notes appendix temporarily to keep track of issues related to the specification. Minor phrasing edits. |
||
2000/06/21 |
Modified the semantics of user-defined for AID level and top level. Updated DTD and examples. |
||
2000/06/29 |
Made use of user defined parameters more clear; changed a-id to agent-identifier; changed a-id-user-defined to aid-user-defined |
||
2000/07/21 |
Changed the names of content-* parameters to be consistent with 00067 specification. Change envelope-to and –from to “to” and “from”. Deleted Section 2.2. on lexical analysis . Removed user-defined elements in envelope (user may define a new tag instead) and in the AID (now unsupported). Removed transport behaviour sub-elements (transport-errors etc.) which are not supported in other syntaxes. Relative time removed for consistency with other specifications |
||
2000/08/16 |
Changed the url and name tags from attribute to start/end form. Added specification for the envelope MIME type and on the body / envelope separation. Added some more references. |
© 2000 Foundation for Intelligent Physical Agents - http://www.fipa.org/
Geneva, Switzerland
Notice |
Use of the technologies described in this specification may infringe
patents, copyrights or other intellectual property rights of FIPA Members and
non-members. Nothing in this specification should be construed as granting
permission to use any of the technologies described. Anyone planning to make
use of technology covered by the intellectual property rights of others
should first obtain permission from the holder(s) of the rights. FIPA strongly
encourages anyone implementing any part of this specification to determine
first whether part(s) sought to be implemented are covered by the
intellectual property of others, and, if so, to obtain appropriate licenses
or other permission from the holder(s) of such intellectual property prior to
implementation. This specification is subject to change without notice.
Neither FIPA nor any of its Members accept any responsibility whatsoever for
damages or liability, direct or consequential, which may result from the use
of this specification. |
Foreword
The Foundation for Intelligent
Physical Agents (FIPA) is an international organisation that is dedicated to
promoting the industry of intelligent agents by openly developing
specifications supporting interoperability among agents and agent-based
applications. This occurs through open collaboration among its member
organisations, which are companies and universities that are active in the
field of agents. FIPA makes the results of its activities available to all interested
parties and intends to contribute its results to the appropriate formal
standards bodies.
The members of FIPA are individually
and collectively committed to open competition in the development of
agent-based applications, services and equipment. Membership in FIPA is open to
any corporation and individual firm, partnership, governmental body or
international organisation without restriction. In particular, members are not
bound to implement or use specific agent-based standards, recommendations and FIPA
specifications by virtue of their participation in FIPA.
The FIPA specifications are
developed through direct involvement of the FIPA membership. The status of a
specification can be either Preliminary, Experimental, Standard, Deprecated or
Obsolete. More detail about the
process of specification may be found in the FIPA Procedures for Technical
Work. A complete overview of the FIPA specifications and their current status
may be found in the FIPA List of Specifications. A list of terms and abbreviations
used in the FIPA specifications may be found in the FIPA Glossary.
FIPA is a non-profit association
registered in Geneva, Switzerland. As of January 2000, the 56 members of FIPA
represented 17 countries worldwide.
Further information about FIPA as an organisation, membership information, FIPA
specifications and upcoming meetings may be found at http://www.fipa.org/.
4 Informative Annex A – Examples
This document is part
of the FIPA specifications and deals with message transportation between
inter-operating agents. This document also forms part of the FIPA Agent
Management Specification [FIPA00023] and contains specifications for:
·
Syntactic representation
of a message envelope in XML form (see [W3Cxml]).
This section gives the concrete syntax for the message envelope specification that must be used to transport messages over a Message Transport Protocol (MTP - see [FIPA00067]). This concrete syntax is designed to complement [FIPA00071] and [FIPA00084].
The name assigned to
this component is:
fipa.mts.env.rep.xml.std
Where required, the MIME type (see [RFC2046] of items generated according to this specification is taken to be application/xml. The charset encoding used in this section must conform to [W3Cxml].
The
following DTD specifies the encoding of the abstract FIPA specification as an
XML message:
<!--
Document Type: XML DTD
Document Purpose: Encoding of FIPA ACL
message envelopes (as in [FIPA0067]).
See http://www.fipa.org
Last Revised: 2000-08-16
-->
<!ELEMENT envelope ( params+ )>
<!ELEMENT params ( to?,
from?,
comments?,
acl-representation?,
payload-length?,
payload-encoding?,
date?,
encrypted?,
intended-receiver?,
received?
)>
<!ATTLIST params index
CDATA #REQUIRED>
<!ELEMENT to ( agent-identifier+ )>
<!ELEMENT from ( agent-identifier )>
<!ELEMENT acl-representation ( #PCDATA )>
<!ELEMENT comments ( #PCDATA )>
<!ELEMENT payload-length ( #PCDATA )>
<!ELEMENT payload-encoding ( #PCDATA )>
<!ELEMENT date ( #PCDATA )>
<!ELEMENT encrypted ( #PCDATA )>
<!ELEMENT intended-receiver ( agent-identifier+ )>
<!ELEMENT agent-identifier ( name,
addresses?,
resolvers?
)>
<!ELEMENT name ( #PCDATA )>
<!ELEMENT addresses ( url+ )>
<!ELEMENT url ( #PCDATA )>
<!ELEMENT resolvers ( agent-identifier+ )>
<!ELEMENT received ( received-by,
received-from?,
received-date,
received-id?,
received-via?
)>
<!ELEMENT received-by EMPTY>
<!ATTLIST received-by value
CDATA #IMPLIED>
<!ELEMENT received-from EMPTY>
<!ATTLIST received-from value
CDATA #IMPLIED>
<!ELEMENT received-date EMPTY>
<!ATTLIST received-date value
CDATA #IMPLIED>
<!ELEMENT received-id EMPTY>
<!ATTLIST received-id value
CDATA #IMPLIED>
<!ELEMENT received-via EMPTY>
<!ATTLIST received-via value
CDATA #IMPLIED>
The following additional rules not specified in the DTD also apply:
EnvelopeWithAllFields := new empty
Envelope;
while ((EnvelopeWithAllFields does not
contain values for all its fields)
OR (all PARAMS elements in the sequence have been processed) ) {
// the processor gets the next envelope in the sequence starting
with the one with the highest index
tempEnvelope = getNextEnvelope;
foreach field in an envelope {
if ((this field has no value in envelopeWithAllFields)
AND (this field has a value in tempEnvelope))
then copy the value of this field from tempEnvelope to
envelopeWithAllFields
}
}
EnvelopeWithAllFields contains now the latest values for all its fields set in the envelope.
Time tokens are based on [ISO8601], with extensions for relative time and millisecond duration’s. Time expressions may be absolute, or relative to the current time. If no type designator is given, the local time zone is used. The type designator for UTC is the character Z. UTC is preferred to prevent time zone ambiguities. Note that years must be encoded in four digits. As examples, 8:30am on April 15th, 1996 local time would be encoded as:
19960415T083000000
The same time in UTC would be:
19960415T083000000Z
[FIPA00023] FIPA Agent
Management Specification. Foundation for Intelligent
Physical Agents, 2000. http://www.fipa.org/specs/fipa00023/
[FIPA00067] FIPA Agent Message
Transport Service Specification. Foundation for
Intelligent Physical Agents, 2000. http://www.fipa.org/specs/fipa00067/
[FIPA00069] FIPA ACL Message
Representation in Bit-Efficient Encoding Specification.
Foundation for Intelligent Physical Agents, 2000.
http://www.fipa.org/specs/fipa00069/
[FIPA00070] FIPA ACL Message
Representation in String Specification. Foundation
for Intelligent Physical Agents, 2000.
http://www.fipa.org/specs/fipa00070/
[FIPA00071] FIPA ACL Message Representation in XML
Specification. Foundation for Intelligent Physical
Agents, 2000.
http://www.fipa.org/specs/fipa00071/
[FIPA00075] Agent Message Transport Protocol for IIOP.
Foundation for Intelligent Physical Agents, 2000.
http://www.fipa.org/specs/fipa00075/
[FIPA00084] FIPA Agent Message Transport Protocol for
HTTP Specification. Foundation for Intelligent Physical Agents, 2000.
http://www.fipa.org/specs/fipa00084/
[ISO8601] Date Elements and Interchange Formats,
Information Interchange-Representation of Dates and Times. International
Standards Organisation, 1998.
http://www.iso.ch/cate/d15903.html
[RFC2046] Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types, Freed and Borenstein, November 1996.
http://www.rfc-editor.org/rfc/rfc2046.txt
[W3Cxml] Extensible Markup Language (XML) 1.0
Specification (Recommendation). World Wide Web Consortium, 1998.
http://www.w3c.org/TR/REC-xml/
1. Here is a simple example of an envelope conforming to the DTD described in Section 2.3:
<?xml
version="1.0"?>
<envelope>
<params index="1">
<to>
<agent-identifier>
<name>receiver@foo.com</name>
<addresses>
<url>http://foo.com/acc</url>
</addresses>
</agent-identifier>
</to>
<from>
<agent-identifier>
<name>sender@bar.com</name>
<addresses>
<url>http://bar.com/acc</url>
</addresses>
</agent-identifier>
</from>
<acl-representation>fipa.acl.rep.xml.std</acl-representation>
<date>20000508T042651481</date>
<encrypted>no encryption</encrypted>
<received >
<received-by value="http://foo.com/acc" />
<received-date value="20000508T042651481" />
<received-id value="123456789" />
</received>
</params>
</envelope>
2. Here is an example which covers all the aspects described in Section 2.3:
<?xml
version="1.0"?>
<envelope>
<params index="1">
<to>
<agent-identifier>
<name>receiver@foo.com</name>
<addresses>
<url>http://foo.com/acc</url>
</addresses>
<resolvers>
<agent-identifier>
<name>resolver@bar.com</name>
<addresses>
<url>http://bar.com/acc1</url>
<url>http://://bar.com/acc2</url>
<url>http://bar.com/acc3</url>
</addresses>
</agent-identifier>
</resolvers>
</agent-identifier>
</to>
<from>
<agent-identifier>
<name>sender@bar.com</name>
<addresses>
<url>http://bar.com/acc</url>
</addresses>
<resolvers>
<agent-identifier>
<name>resolver@foobar.com</name>
<addresses>
<url>http://foobar.com/acc1</url>
<url>http://foobar.com/acc2</url>
<url>http://foobar.com/acc3</url>
</addresses>
</agent-identifier>
</resolvers>
</agent-identifier>
</from>
<comments>No comments!</comments>
<acl-representation>fipa.acl.rep.xml.std</acl-representation>
<payload-encoding>US-ASCII</payload-encoding>
<date>20000508T042651481</date>
<encrypted>no encryption</encrypted>
<intended-receiver>
<agent-identifier>
<name>intendedreceiver@foobar.com</name>
<addresses>
<url>http://foobar.com/acc1</url>
<url>http://foobar.com/acc2</url>
<url>http://foobar.com/acc3</url>
</addresses>
<resolvers>
<agent-identifier>
<name>resolver@foobar.com</name>
<addresses>
<url>http://foobar.com/acc1</url>
<url>http://foobar.com/acc2</url>
<url>http://foobar.com/acc3</url>
</addresses>
<resolvers>
<agent-identifier>
<name>resolver@foobar.com</name>
<addresses>
<url>http://foobar.com/acc1</url>
<url>http://foobar.com/acc2</url>
<url>http://foobar.com/acc3</url>
</addresses>
</agent-identifier>
</resolvers>
</agent-identifier>
</resolvers>
</agent-identifier>
</intended-receiver>
<received>
<received-by value="http://foo.com/acc" />
<received-from value="http://foobar.com/acc" />
<received-date value="20000508T042651481" />
<received-id value="123456789" />
<received-via value="http://bar.com/acc" />
</received>
</params>
</envelope>
3.
Here is an example which also includes
the MIME multipart encapsulation which might be used over HTTP (see [FIPA00084]:
MIME-Version: 1.0
Content-Type:
multipart-mixed ;
boundary=”---------------251D738450A171593A1583EB”
This is not part of the MIME multipart
encoded message.
---------------251D738450A171593A1583EB
Content-Type:
application/xml
<?xml version="1.0"?>
<envelope>
<params
index="1">
<to>
<agent-identifier>
<name>receiver@foo.com</name>
<addresses>
<url>http://foo.com/acc</url>
</addresses>
</agent-identifier>
</to>
<from>
<agent-identifier>
<name>sender@bar.com</name>
<addresses>
<url>http://bar.com/acc</url>
</addresses>
</agent-identifier>
</from>
<acl-representation>fipa.acl.rep.xml.std</acl-representation>
<payload-encoding>US-ASCII</payload-encoding>
<date>20000508T042651481</date>
<encrypted>no
encryption</encrypted>
<received >
<received-by
value="http://foo.com/acc" />
<received-date value="20000508T042651481" />
<received-id
value="123456789" />
</received>
</params>
</envelope>[1]
---------------251D738450A171593A1583EB
Content-Type:
application/text; charset=US-ASCII
... Some payload which
doesn’t end with a CRLF...
---------------251D738450A171593A1583EB--
1. Referencing
There is no specific reference in the FIPA XML envelope reference to the DTD specified in the in section 2.3, Syntax. This is due to the fact that tests have shown that there is no consistent behaviour of most common parser in handling a DOCTYPE specification. The most inconvenient fact is that even in the case of non-validation the parsers are trying to download the DTD from the specified URI.