[Accessibility conventions are described at the bottom of the page]

14. Customization deployment
[> A.][< 13.3.5][^^^]
14.0 Customization deployment
[> 14.1][> A.][< 14.][^^][^^^]
Deployment is more than just document formats
[[1] - supporting the user community will help the deployment be successful
 [1] - different artefacts will support developers and users
 [1] - e.g. the government of Denmark offers an online validation service users can use to check the invoice instance they plan to submit for payment
]
What interchange protocols need to be supported?
[[1] - perhaps a standardized message handling specification?
[[2] - use of ebXML ([ebXML - Electronic business using XML - Section 1.2.1 ebXML - Electronic business using XML])?
 [2] - use of WS-*?
[[3] - [http://www.w3.org/TR/ws-arch/]
]][1] - perhaps a custom Service Oriented Architecture (SOA)?
[[2] - use of XML Remote Procedure Call (XML-RPC)?
[[3] - [http://www.xmlrpc.com/spec]
][2] - use of Simple Object Access Protocol (SOAP)?
[[3] - [http://www.w3.org/TR/soap/]
][2] - use of Representational State Transfer (REST)?
[[3] - [http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm]
]]]
What application interfaces will you need for XML?
[[1] - use of Java Architecture for XML Binding (JAXB)?
[[2] - [http://java.sun.com/developer/technicalArticles/WebServices/jaxb/]
][1] - use of CodeSynthesis XSD/e for C++?
[[2] - [http://www.codesynthesis.com/products/xsde/]
 [2] - an open source development project, not an open standard
][1] - use of the Post Schema Validation Infoset (PSVI)?
[[2] - [http://www.w3.org/TR/xmlschema-1/#d0e504]
][1] - use of Document Object Model (DOM)?
[[2] - [http://www.w3.org/DOM/]
][1] - use of Simple API for XML (SAX)?
[[2] - [http://www.saxproject.org/]
]]
Identification of parties
[[1] - what to use for an end point identifier?
[[2] - tax registration number?
[[3] - could be used by a government as already managed by the government
][2] - GS1 Global Locator Number (GLN/EAN)?
[[3] - a number used to identify an organization as a legal entity
][2] - other international register or infrastructure number?
]]
14.1 Deployment interfaces
[> 14.2][< 14.0][^^][^^^]
14.1.1 Interfacing with the outside world
[> 14.1.2][> 14.2][> A.][< 14.0][^^][^^^]
Message handling
[[1] - responding to a synchronous request
[[2] - e.g. an email message and its reply
][1] - a "pull model" where the recipient goes looking for messages that may have been sent
]
Service Oriented Architectures
[[1] - responding to an asynchronous request
[[2] - e.g. listening to a TCP/IP port and responding to an arbitrary access
][1] - a "push model" where the recipient waits for a message to arrive
]
Use of encryption
[[1] - useful for authentication
[[2] - confirming the sender is who they claim to be
][1] - useful for integrity
[[2] - confirming the content hasn't been tampered with
][1] - useful for non-repudiation
[[2] - proving the sender was the actual sending party
][1] - will XML Advanced Electronic Signature XAdES be used?
[[2] - [http://www.w3.org/TR/XAdES/]
 [2] - the UBL committee is working on publishing guidelines for XAdES use with UBL documents
]]
14.1.2 Interfacing to the application
[> 14.2][> A.][< 14.1.1][^][^^][^^^]
Unmarshalling XML
[[1] - the verb is cited from the JAXB specification
 [1] - moving the information from the XML syntax into the application data structures
 [1] - is validation engaged?
[[2] - the post-schema validation infoset (PSVI) interprets the text fields of XML as data-typed values
 [2] - e.g. consider <Quantity>123</Quantity>
[[3] - the XML syntax represents the text string "123"
 [3] - if the associated schema for Quantity indicates the string value represents a number, then the PSVI delivers the number "123." to the application, not the text string "123"
]]]
Marshalling XML
[[1] - moving the information from the application data structures to XML syntax
 [1] - when using the Simple API for XML (SAX) the "XMLGenerator" companion library is often available
 [1] - nuanced rules regarding serialization need to be followed
[[2] - use of some kind of library is recommended as it follows (should follow) the rules
][1] - is validation available to check the results?
 [1] - is second-pass value validation available to check the results?
]
An example deployment incorporating XSLT and JAXB
[[1] - the application data structures should be oriented to the application and not to UBL
 [1] - opportunity to "filter out" anticipated UBL constructs defined by the customization that are of no interest to the application
]
Supporting the application logic with application object data structures
[[1] - Java code is used to move information from UBL object data structures to application object data structures
]
[Figure 14.1: An example use of JAXB
The diagram depicts the entire UBL validation process as having been completed before the application begins acting on the UBL valid instance. This instance may be the untouched or pruned version of the incoming instance.
The application is split into five sections: the JAXB interface converts the UBL document into UBL objects, which are then interpreted by Java logic into application objects, which are then interpreted by the application logic.
]
Using XSLT in the application
[[1] - some developers find it awkward to maintain the Java code moving information from UBL object data structures to application object data structures
 [1] - maintaining the transformation in XSLT makes sense as XSLT is designed for XML
]
[Figure 14.2: An example use of XSLT and JAXB
The diagram depicts the entire UBL validation process as having been completed before the application begins acting on the UBL valid instance. This instance may be the untouched or pruned version of the incoming instance.
The application preparation phase shows the UBL valid instance being converted using XSLT into an application valid instance of XML.
The application is split into three sections: the JAXB interface converts the application valid instance into application objects, which are then interpreted by the application logic.
]
Important note regarding XML structures and XML syntax
[[1] - interfaces between programs in the data flow allow XML information to flow between programs as SAX events or DOM trees or other abstractions
 [1] - no need for instantiating XML syntax and parsing out the content again at each step
]
14.2 Creating UBL instances
[> 14.3][< 14.1.2][^^][^^^]
14.2.1 Creating UBL instances
[> 14.3][> A.][< 14.1.2][^^][^^^]
Code preparation informed by customization schema
[[1] - some application development environments provide interfaces to XML documents
[[2] - typically an XSD expression creates software components used to access the XML syntax
]]
[Figure 14.3:
This diagram is split horizontally with one area titled "Advance Preparation" and the other area titled "Runtime".
In the "Advance Preparation" area an "XSD" labeled triangle titled "Customization Schema" and identified with a circled number "1" is input to a box titled "Code Preparation". There is also an XSLT labeled triangle titled "Context/Value and Business Rules" and identified with a circled number "2".
In the "Runtime" area a box labeled "Application Code" is fed by a flow from the "Code Preparation" box. The output from "Application Code" is an "XML" labeled triangle titled "Customized Instance".
The flow from this triangle goes out the diagram with the label "Outgoing Customized Instance", while simultaneously flowing into a box labeled "W3C Schema" (into which the "Customization Schema" triangle flows), and into a box labeled "XSLT" (into which the "Context/Value and Business Rules" triangle flows).
]
The XML instance must be well-formed and follow UBL document constraints
[[1] - recall [UBL documents - Section 5.2.2]
[[2] - satisfy the constraints of a UBL W3C schema
 [2] - use UTF-8 character encoding
 [2] - no empty elements (except for UBLExtension)
 [2] - no xsi:schemaLocation
]]
Option to confirm the result of instance creation does not violate any document constraints
[[1] - structural validation using W3C Schema
 [1] - value validation using XSLT
 [1] - mimicking what the recipient is expected to do will ensure the recipient will not balk at the instance
]
14.3 Other deployment considerations
[> A.][< 14.2.1][^^][^^^]
14.3.1 Other customization artefacts
[> A.][< 14.2.1][^^][^^^]
Those defining a customization can make a number of resources available to support the user community
[[1] - documentation of the customization properties
[[2] - e.g. spreadsheets and schemas
][1] - variant business scenarios
[[2] - e.g. profiles and variant document models
][1] - code lists and business rules
[[2] - e.g. genericode files, context/value association files and Schematron scripts
][1] - rules for generating content
[[2] - e.g. calculation models
][1] - documentation for guidance
[[2] - e.g. implementation guides
][1] - samples for testing
[[2] - e.g. sample XML instances
][1] - tools with which to create instances
[[2] - e.g. XForms input
][1] - tools with which to validate that instances conform to the customization
[[2] - e.g. filters, scripts and programs
 [2] - e.g. online validation service
][1] - tools with which to present instances of a customization
[[2] - e.g. stylesheets
][1] - communication tools for message handling
[[2] - e.g. open source software for service oriented architectures (SOA)
]]


This is an accessible version of Crane's commercial training material. The content has been specifically designed to assist screen reader software in viewing the entire textual content. Figures are replaced with text narratives.

Navigation hints are in square brackets:
[Tx.x] and [Fx.x] are textual representations of the applicability icons;
[digit] indicates list depth for nested lists;
[link [URL]] indicates the URL of a hyperlink if different than link;
[EXAMPLE] indicates an example listing of code;
[FIGURE] indicates the presence of a figure replaced by its description;
[>] jumps forward;
[<] jumps backward;
[^] jumps to start of the section;
[^^] jumps to the start of the chapter;
[^^^] jumps to the table of contents.
Suggestions for improvement are welcome: [info@CraneSoftwrights.com]
Book sales: [http://www.CraneSoftwrights.com/links/trn-acc.htm]
Information: [http://www.CraneSoftwrights.com/links/info-acc.htm]
This content is protected by copyright and, as there are no means to protect this accessible version from plagiarism, please do not make any commercial edition available to others.

+//ISBN 1-894049::CSL::Presentation::UBL//DOCUMENT Practical Universal Business Language Deployment 2009-02-12 13:50UTC//EN
Practical Universal Business Language Deployment
Third Edition - 2009-02-12
ISBN 978-1-894049-23-8
Copyright © Crane Softwrights Ltd.