FpML Issues Tracker

1117: JAXB failed to generate Java calsses for all child types of Product

April 27, 2012

closed

Major

Always

Schema

Admin

mgratacos

Summary

When people use xjc in JAXB to generate Java POJO classes for FpML 5.3, all the sub types under Product (eg. Swap, Fra & etc) become empty classes.

The reason is that, in the Product.Model, FpML 5.3 uses a choice to support backward compatbility for assetClass enhancement. it contains 2 pieces: 1. new setup: primaryAssetClass, secondaryAssetClass, productType, productId 2. old setup: productType, productId, assetType

Since productType and productId exist in both new and old setup, it confuses JAXB xjc. So it merges into one collection of any objects. The consequence is that the additional elements of this type cannot be annotated on the existing collection. Thus, xjc doesn't populate the elements that introduced by sub-types.

Here is the Product.model schema:

A classification of the most important risk class of the trade. FpML defines a simple asset class categorization using a coding scheme. A classification of additional risk classes of the trade, if any. FpML defines a simple asset class categorization using a coding scheme. A classification of the type of product. FpML defines a simple product categorization using a coding scheme. A product reference identifier. The product ID is an identifier that describes the key economic characteristics of the trade type, with the exception of concepts such as size (notional, quantity, number of units) and price (fixed rate, strike, etc.) that are negotiated for each transaction. It can be used to hold identifiers such as the "UPI" (universal product identifier) required by certain regulatory reporting rules. It can also be used to hold identifiers of benchmark products or product temnplates used by certain trading systems or facilities. FpML does not define the domain values associated with this element. Note that the domain values for this element are not strictly an enumerated list. A classification of the type of product. FpML defines a simple product categorization using a coding scheme. A product reference identifier. The product ID is an identifier that describes the key economic characteristics of the trade type, with the exception of concepts such as size (notional, quantity, number of units) and price (fixed rate, strike, etc.) that are negotiated for each transaction. It can be used to hold identifiers such as the "UPI" (universal product identifier) required by certain regulatory reporting rules. It can also be used to hold identifiers of benchmark products or product temnplates used by certain trading systems or facilities. FpML does not define the domain values associated with this element. Note that the domain values for this element are not strictly an enumerated list. A product reference identifier. The product ID is an identifier that describes the key economic characteristics of the trade type, with the exception of concepts such as size (notional, quantity, number of units) and price (fixed rate, strike, etc.) that are negotiated for each transaction. It can be used to hold identifiers such as the "UPI" (universal product identifier) required by certain regulatory reporting rules. It can also be used to hold identifiers of benchmark products or product temnplates used by certain trading systems or facilities. FpML does not define the domain values associated with this element. Note that the domain values for this element are not strictly an enumerated list. A classification of the risk class of the trade. FpML defines a simple asset class categorization using a coding scheme.

Notes:

  • iyermakova

    05/24/12 6:02 pm

  • Leave an update

    You must be logged in to post an update.