SWIFT MT/FIN Encoder



Similar documents
Open-ESB tutorials. Schema and Encoding: Import a CSV file. Paul Perez / Bruno Sinkovic. Copyright Pymma Consulting (2009)

Building and Using Web Services With JDeveloper 11g

Create a Web Service from a Java Bean Test a Web Service using a generated test client and the Web Services Explorer

Business Process Management IBM Business Process Manager V7.5

DEVELOPING CONTRACT - DRIVEN WEB SERVICES USING JDEVELOPER. The purpose of this tutorial is to develop a java web service using a top-down approach.

JBoss SOAP Web Services User Guide. Version: M5

OPEN ESB 2.3 TUTORIAL. (Throttling in BPEL SE)

Subscribe to RSS in Outlook Find RSS Feeds. Exchange Outlook 2007 How To s / RSS Feeds 1of 7

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

JBI and OpenESB. Introduction to Technology. Michael Czapski Advanced Solutions Architect, SOA/BI/Java CAPS Sun Microsystems, ANZ

OPEN ESB 2.3 TUTORIAL. Working with FILEBC

Creating Web Services Applications with IntelliJ IDEA

1. Tutorial Overview

Configuring Your Client: Eudora 5.x. Quick Reference

T320 E-business technologies: foundations and practice

Virtual Office Remote Installation Guide

Configuring Your Client: Eudora 5.x

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

T320 E-business technologies: foundations and practice

OUTLOOK WEB APP (OWA): MAIL

BusinessObjects Enterprise XI Release 2

BPEL. A Step by Step Guide: Model-Driven Generation with. Enterprise Architect. T his document will teach you how to use the Business Process

Managing Contacts in Outlook

WA2087 Programming Java SOAP and REST Web Services - WebSphere 8.0 / RAD 8.0. Student Labs. Web Age Solutions Inc.

Gmail Or other POP3

SDK Code Examples Version 2.4.2

Intelligent Event Processer (IEP) Tutorial Detection of Insider Stock Trading

The Oracle Fusion Development Platform

CONNECT Installation and Configuration

Application. 1.1 About This Tutorial Tutorial Requirements Provided Files

How To Create A Hyperlink In Publisher On Pc Or Macbookpress.Com (Windows) On Pc/Apple) On A Pc Or Apple Powerbook (Windows 7) On Macbook Pressbook (Apple) Or Macintosh (Windows 8

USING STUFFIT DELUXE THE STUFFIT START PAGE CREATING ARCHIVES (COMPRESSED FILES)

Open ESB. Sang Shin Java Technology Evangelist Sun Microsystems, Inc. Raffaele Spazzoli Imola Informatica 1

isupplier PORTAL ACCESS SYSTEM REQUIREMENTS

Lab Introduction to Web Services

Set Up Setup with Microsoft Outlook 2007 using POP3

Remedy ITSM Service Request Management Quick Start Guide

GlassFish ESB v2.2 Field Notes

Application Performance Monitoring for WhatsUp Gold v16.2 User Guide

Configuring Outlook 2013 For IMAP Connections

E-Map Application CHAPTER. The E-Map Editor

Operational Decision Manager Worklight Integration

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Migrating helpdesk to a new server

Initial Setup of Mozilla Thunderbird with IMAP for OS X Lion

SFTP Server User Login Instructions. Open Internet explorer and enter the following url:

Quick Scan Features Setup Guide

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

NAS 225 Introduction to FTP Explorer

Microsoft Exchange 2010 and 2007

T320 E-business technologies: foundations and practice

How to test and debug an ASP.NET application

Advanced Service Design

NetBeans IDE Field Guide

DocuPrint C3290 FS Features Setup Guide

Application Monitoring using SNMPc 7.0

USING OUTLOOK WITH ENTERGROUP. Microsoft Outlook

Why Use Blackboard Content System to Store Documents One Time

App Orchestration 2.5

Oracle Web Service Manager 11g Field level Encryption (in SOA, WLS) March, 2012

Using the vcenter Orchestrator Plug-In for vsphere Auto Deploy 1.0

Contents About the Contract Management Post Installation Administrator's Guide... 5 Viewing and Modifying Contract Management Settings...

ACS ChemWorx Quick User Guide Created by: ACS ChemWorx

USING MS OUTLOOK WITH FUS

Using IIS and UltraDev Locally page 1

Oracle SOA Suite 11g Oracle SOA Suite 11g HL7 Inbound Example Functional ACK Addendum

Microsoft Word 2011: Create a Table of Contents

Application Performance Monitoring for WhatsUp Gold v16.1 User Guide

Setup Guide. network support pc repairs web design graphic design Internet services spam filtering hosting sales programming

AXIS 1440 Print Server For EPSON Printers: Product Update. Important Information for Windows

Oracle Java CAPS Binding Component User's Guide

TIBCO ActiveMatrix BPM Mediation Component Development

Working with WebSphere 4.0

Oracle SOA Suite 11g Oracle SOA Suite 11g HL7 Inbound Example

LEARNING RESOURCE CENTRE GUIDE TO OFFICE 365

Creating a Web Service using IBM Rational HATS. For IBM System i (5250) Creating a Web Service using HATS 1

Query JD Edwards EnterpriseOne Customer Credit using Oracle BPEL Process Manager

SOA using Open ESB, BPEL, and NetBeans. Sang Shin Java Technology Evangelist Sun Microsystems, Inc.

October, Install/Uninstall Xerox Print Drivers & Apps Best Practices for Windows 8, 8.1, and 10 Customer Tip

Internet Explorer Browser Clean-up

GETTING STARTED GUIDE 4.5. FileAudit VERSION.

Oracle Service Bus Examples and Tutorials

Printer Sharing of the PT-9500pc in a Windows Environment

EBOX Digital Content Management System (CMS) User Guide For Site Owners & Administrators

Outlook Web App. in Office 365. The Outlook Window. Signing In. (Outlook Exchange Faculty & Staff) Getting Started

Livezilla How to Install on Shared Hosting By: Jon Manning

Lab - Configure a Windows 7 Firewall

Practice Fusion API Client Installation Guide for Windows

ibolt V3.2 Release Notes

Coyote SP - Installation Notes

Installing the ASP.NET VETtrak APIs onto IIS 5 or 6

Important Notes for WinConnect Server VS Software Installation:

1. Open Thunderbird. If the Import Wizard window opens, select Don t import anything and click Next and go to step 3.

OpenESB standalone edition Version 3.0 OpenESB set up in a multiple environments context. Application configurations and variables

How to set up your Secure in Outlook 2010*

Filing Credit Counseling and Debtor Education Certificates

Configuring Network Load Balancing with Cerberus FTP Server

Transcription:

SWIFT MT/FIN Encoder Version 1.0 2011, Harry Liu (HarryLiu123@yahoo.com) 2011, Harry Liu (HarryLiu123@yahoo.com) Page 1

SWIFT MT/FIN Encoder is used to decode SWIFT MT/FIN data into XML format, or encode XML data into SWIFT MT/FIN format. It is built up on SWIFT SDK which provides the basic parsing. SWIFT MT/FIN Encoder also provides flexible extensions for schema validation, cross-fields semantic validation and text validation, through XSLT, Schematron, JavaScript, JRuby, java, etc, or some combinations of them, you can choose depending on your own preference and expertise. SWIFT MT/FIN Encoder seamlessly integrates with the powerful Open Source platform OpenESB and GlassFishESB (JBI based). It can be used in different ways, e.g. in interative SWIFT Encoder Tester, hook-up with dozens of Open JBI components (e.g. ftp, file, database, smtp, imap, pop3, http, soap, rest, jms, ldap, mq, msmq, snmp, scheduler etc), in BPEL engine, POJO engine. SWIFT MT/FIN Encoder can also run outside OpenESB / GlassFishESB, e.g. in Java EE, Java SE. Potentially, SWIFT MT/FIN Encoder can also be used in SeeBeyond/SUN/Oracle Java CAPS platform (the prior generations of OpenESB) in certain ways. Actually SWIFT SAI is a product built up on Java CAPS, combining with SWIFT SDK. This PDF document (http://swiftencoder.appspot.com/swiftencoder.pdf) is a step-by-step tutorial to SWIFT MT/FIN Encoder. There are also several screen casts showing the steps: 1. Basics http://swiftencoder.appspot.com/swiftencoderbasics.html 2. In BPEL http://swiftencoder.appspot.com/swiftencoderinbpel.html 3. In POJO http://swiftencoder.appspot.com/swiftencoderinpojo.html 4. In Java SE http://swiftencoder.appspot.com/swiftencoderinjavase.html 5. In Java EE http://swiftencoder.appspot.com/swiftencoderinjavaee.html 2011, Harry Liu (HarryLiu123@yahoo.com) Page 2

There is also a page (http://swiftencoder.appspot.com/mtxml_tester.jsp) which allows you to perform online decode/encode conversions between MT/FIN and XML. Table of Contents 1. Basics of SWIFT MT/FIN Encoder... 4 2. Using SWIFT Encoder in BPEL... 22 3. Using SWIFT Encoder in POJO... 35 4. Using SWIFT Encoder in Java SE... 46 5. Using SWIFT Encoder in Java EE... 49 2011, Harry Liu (HarryLiu123@yahoo.com) Page 3

1. Basics of SWIFT MT/FIN Encoder We ll go through basic functions of SWIFT Encoder, also practice SWIFT Encoder Tester. We ll show the extensions for cross-fields semantic validation and text validation with examples of XSLT, Schematron, java. Here is a screen cast: http://swiftencoder.appspot.com/swiftencoderbasics.html 2011, Harry Liu (HarryLiu123@yahoo.com) Page 4

Create a project SOA/BPEL Module. Name it as SwiftEncoder 2011, Harry Liu (HarryLiu123@yahoo.com) Page 5

Delete the.bpel file because we don t need it. Copy some resource files into project, they will be used later. Here is an MT test file, mt541.dat. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 6

Here is a schema for fin.541.2009.xsd. Select schema file. In Schema View, navigate to Document->annotation- >encoding. Right-click on encoding, select Properties. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 7

2011, Harry Liu (HarryLiu123@yahoo.com) Page 8

Check Top check box. Save all. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 9

Right-click on schema fin.541.2009.xsd, choose Encoding->Test. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 10

Test Decode. Select the input MT data file, mt541.dat. Specify the output XML file, mt541.xml. Click Process button. Output mt541.xml is generated. Right-click, select View. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 11

You can see view the XML file mt541.xml, e.g. in a web-browser. Note: This sample MT data actually contains a semantic validation error, it is caught by default parsing/validation engine. It will be covered below. Some validation rule types are plugged. Schematron, XSLT, JavaScript, Java, etc I ll give some examples below. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 12

You provide the validation rules via files. For example, select Schematron, then choose file 2011, Harry Liu (HarryLiu123@yahoo.com) Page 13

Select the sample Schematron file, Schematron_Example_MT51_SeqA_SeqA1_22F.sch. Finish the file selection. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 14

Save all and Test again 2011, Harry Liu (HarryLiu123@yahoo.com) Page 15

You see an error pop-up window. Schematron rules are taking effect. The data contains a semantic error, as described by the error message. Checking back the MT data, locating the error point, AFTF is invalid. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 16

Try to use XSLT to validate it Select the provided XSLT sample code,, save, test. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 17

Good. You get an error pop-up window, XSLT rules are taking effect. You also can see the error description. Let s try Java Select the provided Java sample code,, save, test. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 18

You ll see, Java also catches the data error. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 19

Let s correct the MT data error by changing AFTF to AFTE. Save the data. Test again 2011, Harry Liu (HarryLiu123@yahoo.com) Page 20

Ok. Now error goes away. XML output will be generated. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 21

2. Using SWIFT Encoder in BPEL Demonstrate how to use SWIFT Encoder in BPEL SE (Service Engine) by use of a simple example. Here is a screen cast: http://swiftencoder.appspot.com/swiftencoderinbpel.html 2011, Harry Liu (HarryLiu123@yahoo.com) Page 22

Create an BPEL project. Name it as SwiftEncoderInBPEL 2011, Harry Liu (HarryLiu123@yahoo.com) Page 23

Create an WSDL Name it as FilePoll4Decode, select FILE, Poll 2011, Harry Liu (HarryLiu123@yahoo.com) Page 24

Specify MT file name (mt541.mt) and directory. Create another WSDL for FILE Write, name it as FileWrite4Decode. Specify XML file name (mt541.xml) and directory. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 25

Copy the xsd schema fin.541.2009.xsd into project s src folder. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 26

Configure WSDL FilePoll4Decode for part1, change Element or type to element Document in fin.541.2009.xsd Configure use Encoded and encodingstyle swiftencoder-1.0. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 27

For WSDL FileWrite4Decode, change part1 type to xsd:anytype. In BPEL editor, drag-n-drop two WSDL files into the panel as indicated. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 28

Orchestrate BPEL process: Receive Assign Invoke by drag-n-drop as arrows indicated. Configure Receive1 2011, Harry Liu (HarryLiu123@yahoo.com) Page 29

Configure Invoke1 Open Assign1 map editor. Map PollIn/part1 Write/part1 as indicated. Note you see the MT541 message structure on left hand side. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 30

Create a project SOA Composite Application Give name SwiftEncoderInBPELCompApp. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 31

Drag-n-drop project SwiftEncodeInBPEL into casa panel. Click build icon. Panel will be refreshed as below. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 32

Deploy the composite app SwiftEncoderInBPELCompApp. Feed in the input MT file as configured C:\SwiftDemo\data\mt541.mt. The input file disappears and output XML mt541.xml appears. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 33

Take a look at the input MT file mt541.mt. Also take a look the output XML file mt541.xml. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 34

3. Using SWIFT Encoder in POJO Demonstrate how to use SWIFT Encoder in POJO SE (Service Engine) by use of a simple example. Here is a screen cast: http://swiftencoder.appspot.com/swiftencoderinpojo.html 2011, Harry Liu (HarryLiu123@yahoo.com) Page 35

Create a project Java Java Application Give name SwiftEncoderInPOJO 2011, Harry Liu (HarryLiu123@yahoo.com) Page 36

Add Library by right-click on project node Libraries. Choose libraries Encoder-Framework and Encoder-SWIFT. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 37

Right-click SwiftEncoderInPOJO, choose New, POJO Service. Give name SwiftEncoder, package swiftencoderpojo, method name decodemt2xml Write the code for method decodemt2xml 2011, Harry Liu (HarryLiu123@yahoo.com) Page 38

Create a project SOA Composite Application 2011, Harry Liu (HarryLiu123@yahoo.com) Page 39

Give project name SwiftEncoderInPOJOCompApp. Drag-n-drop SwiftEncoderPOJO into casa panel. Then click Build button. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 40

Right-click on the left hand side of casa panel, select Add WSDL Port from the pop-up menu. Choose soap WSDL port. Connect soap port to POJO in casa panel. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 41

Save all. Deploy composite app SwiftEncoderInPOJOCompApp. Create Test case in composite app SwiftEncoderInPOJOCompApp 2011, Harry Liu (HarryLiu123@yahoo.com) Page 42

TestCase1 Choose WSDL Choose operation. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 43

Copy-n-paste the input MT data. Run the test. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 44

Answer yes because it s the first time run. Open the output (the test result), you can see the XML. Note you ll be seeing the entire XML document including block1-block5. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 45

4. Using SWIFT Encoder in Java SE Demonstrate how to use SWIFT Encoder in Java SE (Standard Edition) by use of a simple example. Here is a screen cast: http://swiftencoder.appspot.com/swiftencoderinjavase.html 2011, Harry Liu (HarryLiu123@yahoo.com) Page 46

Create a project Java Java Application Name it as SwiftEncoderInJavaSE 2011, Harry Liu (HarryLiu123@yahoo.com) Page 47

Here is a screen shot. Code is similar to POJO sample (actually much simpler than POJO case), I won t describe the details any more. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 48

5. Using SWIFT Encoder in Java EE Demonstrate how to use SWIFT Encoder in Java EE (Enterprise Edition) by use of a simple example. Here is a screen cast: http://swiftencoder.appspot.com/swiftencoderinjavaee.html 2011, Harry Liu (HarryLiu123@yahoo.com) Page 49

Create a project Java EE EJB Module Give name SwiftEncoderInJavaEE 2011, Harry Liu (HarryLiu123@yahoo.com) Page 50

Choose the default server setting. Add Library 2011, Harry Liu (HarryLiu123@yahoo.com) Page 51

Choose libraries Encoder-Framework and Encoder-SWIFT. Create a Session Bean 2011, Harry Liu (HarryLiu123@yahoo.com) Page 52

Give Bean name SwiftEncoder, package ejb. Right-click in source panel, select Insert Code 2011, Harry Liu (HarryLiu123@yahoo.com) Page 53

Choose Add Business Method from pop-up menu Give name decodemtfile2xmldata, return type java.lang.string, add Parameter mtfilename with type java.lang.string. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 54

Add another method Name encodexmlfile2data, return type java.lang.string, add Parameter xmlfilename with type java.lang.string. Write codes for two methods 2011, Harry Liu (HarryLiu123@yahoo.com) Page 55

Create a web-service for Session Bean. New Web Service Name SwiftEncoderWS, package ws, click Browse button. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 56

Select EJB SwiftEncoder. Right-click web-service SwiftEncoderWS, select Test Web Service 2011, Harry Liu (HarryLiu123@yahoo.com) Page 57

A browser open the Tester Web Service URL, two operations appear as two buttons: decodemtfile2xmldata and encodexmfile2mtdata. Specify a test MT data file in the text box next to button decodemtfile2xmldata, e.g. C:\SwiftDemo\mt541.dat, then click button decodemtfile2xmldata. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 58

The decoded XML is returned with the SOAP response. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 59

Now test encode function Specify an XML file in the text box next to button encodexmfile2mtdata, e.g. C:\SwiftDemo\mt541xml, then click button encodexmfile2mtdata. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 60

You can see the MT data in SOAP response. 2011, Harry Liu (HarryLiu123@yahoo.com) Page 61