170 likes | 333 Views
Product update XML Composer. Peter Prager Canam Software Labs, Inc. Session 2F EDGE 2003 Barcelona, Spain. Agenda. Overview of XML Composer Architecture of XML processing Review of product features XML based external system interfaces Value proposition
E N D
Product update XML Composer Peter Prager Canam Software Labs, Inc. Session 2F EDGE 2003 Barcelona, Spain
Agenda • 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?
Overview 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
Overview 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
Architecture of XML processing xml_reader_eab Reading an XML document Import Proc Step Message Queue buffer_view … Read data source containing XML xml_doc (text 4096) 1 3 Export RDBMS data_view … Use bank_name (text 32) bank_id (numeric 9,0) … 2 6 4 Sequential File xml_reader_eab status_view 7 8 xml_return_code (text 2) xml_message (text 80) xml_position (numeric 15,0) xml_source (text 120) Process XML data now in regular views using action diagram statements … 5 Web service XML reader logic (parses XML)
Architecture of XML processing xml_writer_eab Writing an XML document Import Proc Step Message Queue buffer_view xml_doc (text 4096) 1 Gather data that will make up XML content Export RDBMS data_view … Use bank_name (text 32) bank_id (numeric 9,0) … 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)
Review of product features • Design • Code generation • Runtime features • Runtime error handling • Maintenance • Dictionary
Designing 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
Generating 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
Runtime 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 length>=8),time (if length>=6) • Text – text, timestamp (if length = 20) • Timestamp – text, timestamp
Runtime 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.
Maintaining 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
Using the dictionary • Use standardized node names across XML handlers • Important for data architects • Can have multiple dictionaries • Can import/export dictionary content
XML doc XML doc XML doc XML 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*
Value 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
Demonstration • Thank you!