The Project's flow is represented in the Connectivity Map as follows:
Inbound File eWay –> Schema Validation —> JMS Queue —> Generic Validation —> Batch eWay, Outbound File eWay. These are explained further below.
Inbound File eWay – The File eWay is used to read MX messages to be validated.
Schema Validation – Each MX message has a corresponding XSD Schema file. You must use the XSD OTD Wizard to build an XSD OTD based on the schema file. In this collaboration, the logic is to unmarshal the inbound message to the XSD OTD and then to marshal the OTD to String and send the payload to JMS Queue. This process is to ensure the MX message is well-formed and is validated against the XSD schema. For a different MX message type, build the XSD OTD and create this simple collaboration.
The sample project chooses the ”RedemptionBulkOrderV02”message and schema to demo the usage. The RedemptionBulkOrderV02 schema is obtained from the SWIFTNet Funds ver3.0 CD, which also contains all element types to be validated in the Generic Validation collaboration.
JMS Queue – JMS Queue to hold schema validated messages.
Generic Validation Collaboration – This collaboration contains a set of generic validatio rules, which SWIFt recommends must be applied to an MX message. You can reuse this collaboration to validate all MX Message types. The generic validation rules validate the following identifiers and codes in a MX message:
Verifying BIC (datatype: BICIdentifier), against existence in the BIC directory (ISO 9362)
Verifying BEI (datatype: BEIIdentifier), against existence in the BEI list on SWIFTNet
Verifying ActiveCurrencyAndAmount (datatype: ActiveCurrencyAndAmount), against existence in Currency Code and number of valid decimal digits (ISO 4217)
Verifying Country Code (datatype: CountryCode), against existence in Country Code list (ISO 3166)
Verifying IBAN Identifier (datatype: IBANIdentifier), against IBAN structure as provided by ISO 13616
Verifying BICOrBEI (datatype: AnyBICIdentifier), against existence in the BIC list on SWIFTNet
Verifying ActiveCurrency (datatype: ActiveCurrencyCode), against existence in Currency Code list on SWIFTNet
Verifying ActiveOrHistoricCurrency (datatype: ActiveOrHistoricCurrencyCode), against existence in Currency Code list on SWIFTNet
Batch eWay – The Batch (Local File) eWay is used to read XSD files for Generic Validation. Place all XSD schema files in one directory and make sure the name of the XSD file matches the target namespace specified in the MX message. For example, in the sample input file, there is:
xmlns:Doc=”urn:swift:xsd:swift.if.ia$setr.001.001.02
Therefore the matching schema file name must be swift.if.ia_setr.001.001.02. Please rename the $ character to _, because the $ character is not considered a valid file name pattern in Java.
In Java CAPS, you must open the BAtch eWay configuration in the connectivity map (and under the Target Location node) and make sure the directory name for the XSD files are set to Target Directory Name field.
Outbound File eWay – The File eWay is used to log validatino results and error messages in Generic Validation.
You can place all XSD schema files in one directory. In Connectivity Map, set the directory name in the Target Directory Name, under Target Location section in Batch Local File configuration window. In Generic Validation, the collaboration will read the input message and locate the associated schema file name, in the directory name specified in Batch eWay. Make sure the schema file name does not contain any illegal character $. This $ character should be replaced with _ character in file name. For example, schema file name swift.if.ia$setr.001.001.02 should be renamed to swift.if.ia_setr.001.001.02and placed in the target directory.