Index Changes

Difference between version and version     

Back to Use Encoders In POJOSE, or Use Encoders In POJOSE Info


At line 47 changed 11 lines.
To test the invocation of the custom encoder in POJO SE, we need to have a XSD metadata with custom encoding information and input data in native format. In this sample, we'll create a custom defined structure with encoding information and a sample text delimited data as input.
[{Image src='image005.png'align='top' }]
Let’s name this custom defined structure as “customDefined1”. This will create the customDefined1.xsd file in the specified location.
[{Image src='image007.png'align='top' }]
Apply custom encoding by right clicking on the xsd and selecting "Encoding -> Apply Custom Encoding".
[{Image src='image009.png'align='top' }]
As an example, we have following structure defined (the root node contains 2 groups nodes “group1” and “group2” which are delimited by the delimiter of ‘|’. The first group node contains 2 delimited fields “delimited1” and “delimited2” which are delimited by the delimiter of ‘,’, and the second group node contains 2 fixed-length fields “fixed1” and “fixed2” which are 10 and 15 bytes long, respectively) with custom encoding information.
[{Image src='image011.png'align='top' }]
The root node is selected as the “Top” node, and there are 2 levels of delimiters defined there as follows:
[{Image src='image013.png'align='top' }]
You can click on the double-down arrow to validate the customDefine1.xsd for XML conformity.
To test the invocation of the custom encoder in POJO SE, we need to have a XSD metadata with custom encoding information and input data in native format.
Please refer to [Create a Custom Defined Structure and Test it] for creating the sample custom defined structure and test it using Encoder Tester.
At line 59 removed 10 lines.
! Launch the Encoder Tester
Launch the Encoder Tester to test customDefine1.xsd on an input data. As an example, we create a text delimited input data file “customDefined1.dat” with data “a,b|0123456789|abcde12345ABCDE”.
[{Image src='image015.png'align='top' }]
Then launch the tester by right clicking on the xsd and selecting "Encoding -> Test".
[{Image src='image017.png'align='top' }]
Select input data file “customDefined1.dat” in the "Test Encoding" dialog.
[{Image src='image019.png'align='top' }]
After successful decoding, you should see the decoded XML output as “customDefined1.xml"
[{Image src='image021.png'align='top' }]
\\

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-30) was last changed on 19-Nov-08 17:34 PM, -0800 by LixinTang