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

Document Information

Using the Message Library for EDIFACT

Overview of the EDIFACT Message Library

About the EDIFACT Message Library

References

Character Encoding

UN/EDIFACT Directory Support

SEF File Support

UN/EDIFACT Validation Support

UNA Segment Support

On Demand Parsing

Errors and Exceptions

Installing the Message Library for EDIFACT

Using UN/EDIFACT Message Libraries

Displaying UN/EDIFACT OTDs

To Display UN/EDIFACT OTDs

Building UN/EDIFACT OTD Collaborations

To Build UN/EDIFACT OTD Collaborations

Customizing the UN/EDIFACT OTDs

To Customize UN/EDIFACT OTDs

Creating UN/EDIFACT OTDs from SEF Files

To Create UN/EDIFACT OTDs from SEF files

Possible Differences in Output When Using Pass-Through

Java Methods for UN/EDIFACT OTDs

Get and Set Methods

Setting Delimiters and Indicators

Available Methods

check

Signature

Description

Exceptions

checkAll

Signature

Description

Exceptions

clone

Signature

Description

Exceptions

countxxx

Signature

Description

Exceptions

countLoopxxx

Signature

Description

Exceptions

getxxx

Signature

Description

Exceptions

getAllErrors

Signature

Description

Exceptions

getDecimalMark

Signature

Description

Exceptions

getElementSeparator

Signature

Description

Exceptions

Example

getFGValidationResult

Signature

Description

Exceptions

getICValidationResult

Signature

Description

Exceptions

getInputSource

Signature

Description

Exceptions

getLoopxxx

Signature

Description

Exceptions

getMaxDataError

Signature

Description

Exceptions

getMaxFreedSegsComsNum

Signature

Description

Exceptions

getMaxParsedSegsComsNum

Signature

Description

Exceptions

getMsgValidationResult

Signature

Description

Exceptions

getRelease

Signature

Description

Exceptions

getRepetitionSeparator

Signature

Description

Exceptions

Examples

getSegmentCount

Signature

Description

Exceptions

getSegmentTerminator

Signature

Description

Exceptions

Example

getSubelementSeparator

Signature

Description

Exceptions

Example

getTSValidationResult

Signature

Description

Exceptions

getUnmarshalErrors

Signature

Description

Exceptions

hasxxx

Signature

Description

Exceptions

hasLoopxxx

Signature

Description

Exceptions

isUnmarshalComplete

Signature

Description

Exceptions

marshal

Signature

Description

Exceptions

marshalToBytes

Signature

Description

Exceptions

marshalToString

Signature

Description

Throws

performValidation

Signature

Description

Exceptions

reset

Signature

Description

Exceptions

setxxx

Signature

Description

Exceptions

setDecimalMark

Signature

Description

Exceptions

setDefaultEDFDelimiters

Signature

Description

Exceptions

Example

setElementSeparator

Signature

Description

Exceptions

Examples

setLoopxxx

Signature

Description

Exceptions

setMaxDataError

Signature

Description

Exceptions

setMaxFreedSegsComsNum

Signature

Description

Exceptions

setMaxParsedSegsComsNum

Signature

Description

Exceptions

setRelease

Signature

Description

Exceptions

setRepetitionSeparator

Signature

Description

Exceptions

Example

setSegmentTerminator

Signature

Description

Exceptions

Example

setSubelementSeparator

Signature

Description

Exceptions

Example

unmarshal

Signature

Description

Exceptions

unmarshalFromBytes

Signature

Description

Exceptions

unmarshalFromString

Signature

Description

Exceptions

EDFOTDErrors Schema File and Sample XML

Contents of the EDFOTDErrors.xsd File

Sample Validation Output XML

Using UN/EDIFACT Message Libraries

This topic includes instructions for working with the UN/EDIFACT message structures, or OTDs, provided in the UN/EDIMessagessage Library, including customizing message structures and building UN/EDIFACT Collaborations.

The following topics provide instructions for working with the message library:

Displaying UN/EDIFACT OTDs

After installing the UN/EDIFACT Message Library, you can view the message structures in the OTD Editor as described below.

To Display UN/EDIFACT OTDs

  1. Make sure you are connected to the Java CAPS Repository from NetBeans.
  2. In the Projects window, expand CAPS Components Library, expand Message Library, and then expand EDIFACT.

    Depending on which message libraries you installed, the envelope, v3, or v4 folders are visible. The v3 folder includes files for UN/EDIFACT version 3, and the v4 folder includes files for UN/EDIFACT version 4.

  3. Expand the v3 or v4 folder.

    Nodes for each installed UN/EDIFACT directory appear, such as D01B. The table below describes the naming conventions for the OTDs.


    eDF_
    Abbreviation of the protocol name
    v3_ or v4_
    Indicates the UN/EDIFACT version
    D00A_
    UN/EDIFACT directory
    APERAK_
    Abbreviation of the message name
    _Full
    Fully enveloped OTD version that includes the inner and outer envelopes

    The folder also includes a Metadata folder, which holds the SEF files for the library. You can use the SEF files to customize the OTD as described in Customizing the UN/EDIFACT OTDs.

Building UN/EDIFACT OTD Collaborations

This section describes how to build Java Collaborations that use the UN/EDIFACT OTDs provided in the UN/EDIFACT Message Library. To customize the OTDs before building the Collaboration, refer to Customizing the UN/EDIFACT OTDs.

To Build UN/EDIFACT OTD Collaborations

  1. In the NetBeans Projects window, right-click the Project for which you want to create a Collaboration, point to New, and select Collaboration Definition (Java).

    The Collaboration Definition Wizard dialog box appears.

  2. Enter the name of the Collaboration and specify whether to use and existing or new web service operation.
  3. Click Next.

    The next page to appear depends on the web service type you selected.

  4. Do one of the following:
    • If you selected an existing web service, do the following:
    • If you selected a new web service, enter a name for the operation and then click Next.
      1. Browse to and select the web service to use, and then click Next.
      2. Browse to and select the input message to use, and then click Next.
      3. Browse to and select the output message to use, and then click Next.
  5. To use envelope OTDs, navigate to envelopes in the Look In field and double-click the envelopes to use.

    Envelopes are located in \CAPS Component Library\Message Library\EDIFACT\envelopes.

    The envelope names appear in the Selected OTDs section of the wizard.

  6. To select message OTDs, navigate to the UN/EDIFACT directory in the Look In field.

    The UN/EDIFACT directories are located in \CAPS Component Library\Message Library\EDIFACT\version, where version is either v3 or v4.

    The Look In field displays the OTDs for the selected UN/EDIFACT directory. The table below describes the naming convention for the OTDs.


    eDF_
    Abbreviation of the protocol name
    v3_ or v4_
    UN/EDIFACT version
    D00A_
    UN/EDIFACT directory
    APERAK_
    Abbreviation of the transaction name
    _Full
    Fully enveloped OTD version that includes the inner and outer envelopes
  7. Double-click the OTDs to use.

    The OTDs appear under Selected OTDs.

  8. Click Finish.

    The Collaboration appears in the Collaboration Editor. You can now use the Java CAPS and OTD methods to build the business logic for the Collaboration. For information about the UN/EDIFACT OTD methods, see Java Methods for UN/EDIFACT OTDs.

Customizing the UN/EDIFACT OTDs

The OTDs provided in the OTD Library cannot be customized. However, the Message Library provides the SEF files so you can modify the file and then rebuild it. You can then rebuild the OTD with the customized SEF file as described in the following section. The procedure below describes how to save the SEF files locally for editing.

To Customize UN/EDIFACT OTDs

  1. In the NetBeans Projects window, expand CAPS Component Library, expand Message Library, expand EDIFACT, and then expand v3 or v4.
  2. Expand the folder for the UN/EDIFACT directory you want to work with, such as D01B, and then expand Metadata.

    The metadata folder displays the available SEF files.

  3. Right-click the SEF file you want to customize, and then click Export.

    The Save As dialog box appears.

  4. Select a location for the SEF file and click Save.
  5. Use a SEF editor to customize the file.
  6. Use the SEF OTD wizard to rebuild the OTD as described in the next section.

Creating UN/EDIFACT OTDs from SEF Files

This section describes how to create UN/EDIFACT OTDs using SEF files. The UN/EDIFACT Message Library includes the SEF files for the OTDs so you can customize the OTD. Once you have tailored the SEF file to your business requirements, you can use the procedure below to recreate the OTD.

To create OTDs from SEF files, you use the SEF OTD wizard to build the OTD using selected SEF files. The SEF OTD wizard is packaged separately from the Message Library, so make sure you have installed it. For information, see Installing the Message Library for EDIFACT.

To Create UN/EDIFACT OTDs from SEF files

  1. In the NetBeans Projects window, right-click the Project, point to New, and then click Object Type Definition.

    The New Object Type Definition dialog box appears.

  2. Select SEF in the OTD Wizard list, and then Next.

    The Select SEF File(s) page appears.

  3. In the Look In field, navigate to the folder where the SEF file for this OTD resides, and then double-click the SEF file.
  4. Click Select, and when the file appears in the box at the bottom of the page, click Next.

    The Select OTD Options page appears.

  5. To include the inner and outer envelopes, select the Include Outer and Inner Envelopes option.
  6. To use local codes for segment IDs, select the Segment IDs Using Local Codes option and enter the code.
  7. To avoid the OTD using interfaces for date and time types, select the Do Not Use Interfaces for Date and Time Types option.
  8. Select the transaction sets you want to include using the Ctrl and Shift keys to select multiple options.
  9. Click Finish.

    The OTD Editor appears, displaying the OTD.

Possible Differences in Output When Using Pass-Through

If you are using a pass-through Collaboration, the output file contains essentially the same data as the input file. Certain differences in output, based on variations in acceptable interpretation of the information, are acceptable, provided that the data conforms to the formats specified for the elements. For example:

The reason these changes occur is that, during pass-through, certain data fields are parsed and stored as Java objects other than strings; for example, Date or Double. The actual value of all the information must remain the same.