JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS Custom Encoders User's Guide     Java CAPS Documentation
search filter icon
search icon

Document Information

Designing Custom Encoders

Understanding the Encoder Framework

Abstract Message Structure

Parent, Child, and Sibling Nodes

Root Nodes

Non-leaf Nodes

Leaf Nodes

Creating the Abstract Message Definition

Recursive Structure

Binary Data Types

Applying Custom Encoding to an XSD

To Apply the Custom Encoder to an XSD

Editing Encoding Properties

Encoding Properties

Node Type Default Values

Order Property

Data Encoding

Matching Data Patterns

Defining Byte Patterns

Specifying Pattern Alignment

Specifying Delimiters

Delimiter List

Delimiter Properties

Delimiter Levels

Delimiter Type

Escape Option

Precedence

Optional

Terminator

Delimiter Characters (Bytes)

Escape Sequences

Multiple Delimiters

Anchored and Detached Delimiters

Begin and End Delimiters

Constant and Embedded Delimiters

Defining a Delimiter List

To create a delimiter list

Validating and Testing the Custom Message Definition

Validating the Custom Message Definition

Testing the Encoder Runtime Behavior

Using Custom Encoders in JBI Projects

To Use a Custom Encoder in a JBI Project

About Data Parsing and Serialization

Encoding Process

encodeToString() Method

encodeToBytes() Method

encodeToStream() Method

encodeToWriter() Method

Decoding Process

decodeFromString() Method

decodeFromBytes() Method

decodeFromStream() Method

decodeFromReader() Method

Setting Delimiters

Applying Custom Encoding to an XSD

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:

To Apply the Custom Encoder to an XSD

  1. In your project, right—click to access the project context menu and add a new XML Schema.
    image:Illustration described in content.

    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.
    image:Illustration described in content.

    Once you apply the Encoder, a special encoding node is automatically added as a child node of an annotation node.


    image:Illustration described in content.
  3. To edit the encoding rules for the individual elements, right-click the encoding node and select Properties.
    image:Illustration described in content.
  4. After applying the Encoder, the context menu changes as shown in the following illustration. To reset the parameters for all nodes to their default values, reapplying the Encoder. The node structure you have created will be preserved.
    image:Illustration described in content.