ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Conversion of SWIFT messages to XML through XSLT

Post new topic  Reply to topic
 Conversion of SWIFT messages to XML through XSLT « View previous topic :: View next topic » 
Author Message
santy
PostPosted: Thu Feb 05, 2009 11:30 pm    Post subject: Conversion of SWIFT messages to XML through XSLT Reply with quote

Centurion

Joined: 03 Nov 2006
Posts: 141

Hi,

I'm working on WMB 6.0.

My task is to convert incoming SWIFT 566 message to XML with XSLT.

The problem I'm facing is,

SWIFT 566 message contains D2 block which is repetating, I have to write an XSLT for that.

Scenario is - If D2 block is getting repetaed more that once in incoming message, how can I write an XSLT which will form more that one D2 block.

For e.g.
If SWIFT 566 message contains 3 D2 blocks (Cashmove blocks)-
16R:CASHMOVE
-------
-------
16S:CASHMOVE
16R:CASHMOVE
-------
-------
16S:CASHMOVE
16R:CASHMOVE
-------
-------
16S:CASHMOVE

the corresponding XML output through XSLT will be -
<cashmove>
---------
---------
<cashmove>
<cashmove>
---------
---------
<cashmove>
<cashmove>
---------
---------
<cashmove>

As I'm very new to XSLT, I'm looking for your help.

Thanks.
Back to top
View user's profile Send private message
zpat
PostPosted: Fri Feb 06, 2009 12:44 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

I thought XSLT was used to transform XML to XML?

http://www.w3.org/TR/xslt

If converting Swift FIN 15022 messages to XML, the traditional way would be to define a TDS message set for the input and then generate XML as the output message.

IBM provide a suitable TDS message set. Support pac IA0T (not free).
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Feb 06, 2009 12:56 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
My task is to convert incoming SWIFT 566 message to XML with XSLT.
I am not an expert in XSLT, but I know a little about SWIFT messages and they are not simple to parse. XSLT is not a general-purpose programming language.
I agree with zpat. There is a message set available for doing this. Or you could model it yourself using the SWIFT sample as a starting point. Or you could write your parser in Java or C. Any of those options is likely to be a lot easier than using XSLT.
Back to top
View user's profile Send private message
dominik.schweers
PostPosted: Mon Feb 09, 2009 3:10 am    Post subject: Reply with quote

Novice

Joined: 23 Oct 2008
Posts: 17

Have a look at this:

http://wife.sourceforge.net/index.php?page=home

Its a Open Source Library that can parse SWIFT MT into an Java Object Tree. There is also a Writer that can serialize this Object Tree to XML. Doing so only needs few lines of Java Code.

The resulting XML can be handled via XSLT.

If you really want to follow this approach, I would try it like this.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Feb 09, 2009 3:49 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

I would look at the Swift sample that comes with WMB (see the info center) - adapting this would make sense.

However you can also treat these messages as BLOB and extract the relevant tags/data using ESQL logic.

If you are only looking for a couple of tags this would be easier than defining a message set (unless you know a lot about TDS).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Conversion of SWIFT messages to XML through XSLT
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.