Not logged in | Login
Abstract Message Definition
This document assumes that you are working with an existing XML Schema Definition (XSD) or that you are creating an XSD. There are a number of tools available that help you create an XML schema, including NetBeans. Once you create an XSD you can apply the Custom Encoder as described in this document.
A recursive structure is allowed in an XML schema document used to define a custom structure. The recursive elements can be introduced inside a local XML schema definition by import statements, or by include statements, in the XSD.
The Custom Encoder supports both linear recursion and mutual recursion by import statements. It also supports mutual recursion from include statements.
The Custom Encoder supports elements of binary data type, as well as String data type. Far an element field of binary data type, the data type of “hexBinary” or “base64Binary” can be specified in the XML schema using the XSD editor.
Note that, base64 encoded data expands by a factor of 1.33 times the original size, and hexadecimal encoded data expands by a factor of 2 times original size, assuming an underlying UTF-8 text encoding in both cases. If the underlying text encoding is UTF-16, then these numbers double.
In the absence of a predefined representation of the metadata describing the data format, you must manually create the Abstract Message Definition and apply the Custom Encoder. To begin this process, you must create an XSD and apply the Custom Encoder, as follows:
1. In your project, right—click to access the project context menu and add a new XML Schema.
You will need to develop the XSD node structure to match the parsing of the serialized message stream being processed. This process is described in the topics following this one.
2. In the resulting XSD, right—click to access its context menu and select Encoder > Apply Custom Encoder.
3. Once the Encoder has been applied, a special encoding node will automatically be added as a child node of an annotation node.
4. By right-clicking the encoding node and selecting Properties, you can edit the encoding rules for the individual elements.
5. After applying the Encoder, the context menu changes as shown in the following illustration. Reapplying the Encoder resets the parameters for all nodes to their default values. The node structure you have created will be preserved.
|6||09-Jun-09 16:33 PM, -0700||rjacobus||3220||to previous|
|5||10-Dec-08 13:43 PM, -0800||NormS||1873||to previous | to last|
|4||10-Dec-08 13:42 PM, -0800||NormS||1912||to previous | to last|
|3||10-Dec-08 13:27 PM, -0800||NormS||1842||to previous | to last|
|2||09-Dec-08 17:17 PM, -0800||NormS||1792||to previous | to last|
|1||09-Dec-08 16:44 PM, -0800||NormS||1705||to last|