The CMIP eBonding/TA XML Agent Gateway API is an extensible
high-level Java application framework used in the implementation of CMIP
Electronic Bonding Agent Gateways for Trouble Administration (EBTA) and
Mechanized Loop Test (MLT). It provides an external
ANSI T1.227/228/262 compliant CMIP eBonding Agent interface for communication
with your trading partner's EBTA CMIP Manager Gateway and an ANSI T1.277/278
XML messaging backend for easy integration with your own internal trouble
ticketing and administration system (eg. Remedy, Clarify, proprietary legacy,
etc).
The eBonding/TA XML Agent Gateway API provides an
extensible top level agent gateway class which implements the core CMIS
message processing framework along with a transport adapter interface
and core transport implementation class which provides some of the
necessary communications related processing. The API additionally includes
messaging classes which represent the outstanding operations which are
being processed by the agent.
The primary classes used directly by most agent gateway implementations are:
-
XmlEBTAAgentGateway
-
XmlEBTATransportAdapter
-
XmlEBTACoreTransportAdapter
There are 3 main steps in implementing an agent gateway using this API:
- extend the
XmlEBTACoreTransportAdapter
- provide your own XML transport
- you can use SOAP,JMS,MQ,file system,propietary,etc
- extend the
XmlEBTAAgentGateway class
- load your own custom XML parameters if needed
- attach your custom transport adapter to the framework
- set up your XML configuration file
- include CMIP communications and security parameters
- configure logging and framework parameters
- include eBonding specific parameters (networkId, etc)
The following example shows where to include your custom XML transport
processing code to send XML messages to and receive XML messages from
your internal trouble ticketing system.
public class CustomTransportAdapter
extends XmlEBTACoreTransportAdapter
{
public CustomTransportAdapter(XmlEBTAAgentGateway gw)
{
super(gw);
}
public void processMessage()
{
// -- ------------------------------------------- --
// -- YOUR CODE TO RECEIVE XML MESSAGES GOES HERE --
// -- You can use SOAP,JMS,MQ, etc --
// -- ------------------------------------------- --
Element xml_msg = ... // -- received XML message
long correlation_id = .. // -- received correlation-ID
// --
// -- pass the XML message and correlationID to the API
// --
this.receiveXml(xml_msg, correlation_id);
}
/**
* Must implement abstract sendXML method.
*/
public long sendXml(Element xml_request,
long correlation_id)
throws XmlEBTATransportException
{
// -- ------------------------------------------- --
// -- YOUR CODE TO SEND XML MESSAGE GOES HERE --
// -- you can use XML,SOAP,JMS,MQ, etc. --
// -- ------------------------------------------- --
return correlation_id;
}
}
The next code segment shows an example implementation of the
XmlEBTAAgentGateway class which uses the
CustomTransportAdapter.
public class Example_EBTAAgentGateway
extends XmlEBTAAgentGateway
{
public static void main(String[] args) throws Exception
{
// --
// -- create, configure and initialize the agent
// --
Example_EBTAAgentGateway agent =
new Example_EBTAAgentGateway();
agent.configure("config.xml"); // init. agent
agent.initializeTransport(); // init. custom adapter
agent.initializeData(); // init. agent structures
while(true)
{
try{ Thread.sleep(1000); } catch(Exception e) { }
}
}
public Example_EBTAAgentGateway() throws Exception
{
super("Example_EBTAAgentGateway", "ebTAAgentGateway");
}
public void initializeTransport()
{
try
{
// --
// -- Create new Custom TransportAdapter instance
// --
CustomTransportAdapter adapter
= new CustomTransportAdapter(this);
// --
// -- configure adapter
// --
adapter.setRequestTimeoutMillis(120000);
adapter.setConfirmTimeoutMillis(120000);
this.setTransportAdapter(tadapter);
}
catch(Exception e)
{
fatalError("cannot init. transport adapter", e);
}
}
}
This small amount of code once customized with your own XML transport
mechanism provides a complete eBonding CMIP Agent Gateway which can
communicate with your internal trouble ticketing and administration
system. All you need to do now is implement the tML-TA and tML-ServiceTest
XML interface in your trouble ticketing system.
For complete JavaDoc and implementation documentation for this API,
please download the DynamicTMN® CMIP eBonding/TA Suite
evaluation package.