Skip to content

This Framework allows the parsing and manipulation of Swift messages in Dell Boomi Integration Platform.

Notifications You must be signed in to change notification settings

anthonyrabiaza/Swift2XML

Repository files navigation

Swift2XML

This Framework allows the parsing and manipulation of Swift messages in Dell Boomi Integration Platform. The Framework is generic and support all Swift Message Types.

Getting Started

Please download the libraries swift2xml, gson and pw-swift-core from github.

Prerequisites in Boomi

Creation of Custom Library

Upload the following jar file to Setup>Account>Libraries:

  • gson-version.jar
  • pw-swift-core-version.jar
  • swift2xml-version.jar

The jars are inside lib and jar folder, the common-lang library is not required as it is already bundle with the Boomi Atom.

And then create a Custom Library (you can call it Script_Swift2XML) with the three library

Alt text

The latest versions of the first two jars are available here: https://sourceforge.net/projects/wife/

Once created, please deploy the Custom Library to the Molecule/Atom where you will like to test the Framework

Creation of XML Profile

Create a one XML Profile based on MT103.xml (in the project) or based on generated XML using Swift2XML (open the JUnit class and create a new testcase)

Alt text

Use of Swift2XML in a Process

In your Boomi process, you need to use the "Data Processing Shape" with Custom Scripting step.

Only 4 lines of code (copy/paste) are required.

Adding import after the two default import statements

import com.boomi.proserv.swift.SwiftToXML;

Converting

  1. From Swift to XML Adding the following snippet before the last command (dataContext.storeStream(is, props);)
  String swift = SwiftToXML.inputStreamToString(is);
  String xml   = SwiftToXML.parseSwift(swift);
  
  is = SwiftToXML.stringToInputStream(xml);
  1. From XML to Swift
  String xml   = SwiftToXML.inputStreamToString(is);
  String swift = SwiftToXML.parseXML(xml);
  
  is = SwiftToXML.stringToInputStream(swift);

Example of a process Process

The following process read different Swift message types from the Disk, get the Message with type 103 and remove the 71A tag.

Alt text

Decision using the message type

Alt text

Removing a tag

Alt text

Execution view

Alt text

Execution view - Input Swift Message (type 103)

Alt text

Please note the presence of the last element in block 4:

:71A:SHA

Execution view - XML Message generated by Swift2XML

Alt text

Execution view - Swift Message generated by Swift2XML after removing the tag

Alt text

About

This Framework allows the parsing and manipulation of Swift messages in Dell Boomi Integration Platform.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages