Title: Product update XML Composer
1Product update XML Composer
- Peter Prager
- Canam Software Labs, Inc.
- Session 2F
- EDGE 2003 Barcelona, Spain
2Agenda
- Overview of XML Composer
- Architecture of XML processing
- Review of product features
- XML based external system interfaces
- Value proposition
- How is it different then the Proxy XML
capability?
3Overview of XML Composer
- What it is
- A Windows based development tool that generates
XML processing External Action Blocks (EABs) for
Advantage Gen applications - There are two types of XML processing EABs
- XML Reader
- At runtime, parses XML document
- XML Writer
- At runtime, creates XML document
BI-DIRECTIONAL
4Overview of XML Composer
- Transforms data between XML and Advantage Gen
views - Enables XML data to be manipulated as regular
Advantage Gen views - Allows visual design of XML data structure
- Visually map attribute views to XML elements and
attributes - Works in all platforms by generating External
Action Block code (COBOL, C, Java) - High performance, specialized code generated
- No other runtime objects required
5Architecture of XML processing
xml_reader_eab
Reading an XML document
Import
Proc Step
buffer_view
Message Queue
xml_doc (text 4096)
Read data source containing XML
1
3
Export
data_view
RDBMS
bank_name (text 32) bank_id (numeric 9,0)
Use
2
4
6
Sequential File
xml_reader_eab
status_view
7
xml_return_code (text 2) xml_message (text
80) xml_position (numeric 15,0) xml_source (text
120)
8
Process XML data now in regular views using
action diagram statements
5
Web service
XML reader logic (parses XML)
6Architecture of XML processing
xml_writer_eab
Writing an XML document
Import
Proc Step
buffer_view
Message Queue
xml_doc (text 4096)
1
Gather data that will make up XML content
Export
data_view
RDBMS
bank_name (text 32) bank_id (numeric 9,0)
Use
2
3
4
6
Sequential File
xml_writer_eab
status_view
7
Write XML to data source
xml_return_code (text 2) xml_message (text
80) xml_position (numeric 15,0) xml_source (text
120)
8
Web service
5
XML writer logic (creates XML)
7Review of product features
- Design
- Code generation
- Runtime features
- Runtime error handling
- Maintenance
- Dictionary
8Designing XML handlers
- Need two sides to create XML handler
- Advantage Gen EAB with import/export views
- EAB source code analysis
- Use Advantage Gen plug-in interface
- XML document
- Build manually node by node with built-in editor
- Import XML schema
- Import sample XML document
- Validate XML document
- Map attribute views to XML nodes
- Additional documentation schema, mapping
9Generating code for XML handlers
- Generate source code for all Advantage Gen
language environments - COBOL
- C
- Java
- Java requires JAXP compliant parser installed on
the target JAVA runtime environment - Single or batch generation
10Runtime features
- Can read and write formatted nodes
- Date, Time, Timestamp, Numeric
- Decimal symbol set on document level
- Number of decimal places set on node level
- Field Domain Compatible formats
- Date - text, date ,number
- Time - text, time, number
- Number - text, number, date (if lengthgt8),time
(if lengthgt6) - Text text, timestamp (if length 20)
- Timestamp text, timestamp
11Runtime error handling
- Error handling needs special work attribute set
- CANAM-XML
- XML-RETURN-CODE (2 characters)
- XML-MESSAGE (80 characters)
- XML-POSITION (numeric 15 digits)
- XML-SOURCE (120 characters)
- Possible error codes returned by XML handler
- OK - Successful.
- EB - End of buffer.
- XML Reader parsing was OK so far but end of
buffer is encountered while more data was
expected. - XML Writer buffer is exhausted while more data
was needed to be written out. - IC - Invalid character.
- ER - Unknown error
- MN - Missing node. A mandatory node is missing.
- UE - Unknown entity.
- UN - Unknown node. A foreign node has been
encountered within a non-extensible element or
attribute list boundary. - DA - Duplicate attribute.
- PE - Pattern error. A date/time/timestamp field
value could not be parsed from the input source
based on the desired pattern format.
12Maintaining XML handlers
- XML handlers appear in HE or CSE as EABs
- Can perform change impact analysis quickly
- How to migrate changes quickly to XML handler?
- Adoption
- View changes
- Generate EAB source code as usual
13Using the dictionary
- Use standardized node names across XML handlers
- Important for data architects
- Can have multiple dictionaries
- Can import/export dictionary content
14XML based external system interfaces
- Most XML based document processing requirements
are to communicate with external (non-Advantage
Gen) systems - Can employ similar development practices for
external systems with
AG Transaction 1
AG Transaction 2
XML writer EAB
XML reader EAB
RDBMS 2
Message Queue
RDBMS 1
RDBMS 3
Non-AG Transaction
XML reader subroutine
15Value proposition
- Allows developers to focus on the business logic
instead of the XML handling code - Use regular Action Diagram Statements to
manipulate XML data in traditional views - Reduced learning curve
- Easy to use interface for XML Advantage Gen
view mapping - Learn to use one tool for
- all types of XML applications
- varied architectures
- for all supported platforms (COBOL, C, Java)
- Much faster development and maintenance
- Visual design
- External Action Block (EAB) source code
generation - Version control (adoption)
- Hi return on investment (ROI)
- The XML Thunder companion product is available
for the other side (non-Gen systems) for easy
integration
16Differences from Proxy XML support
XML Composer Proxy XML
Architecture All (block mode, batch, client/server, background, web) Web (COM and Java proxies)
Language environment COBOL, C, Java COM and Java
Applications Any AG application need to have access to XML values on any AG target platforms. (intra-and inter-system communications) When data is passed to AG servers using Proxies.
17Demonstration