A4SWIFT MX – Pipeline components

There are two types of SWIFT messaging. MT and MX(ISO20022). A4SWIFT 3.0 is originally designed to be used for MT messaging. But Microsoft supports MX messaing with A4SWIFT 3.0 SP1. Still, there are some other restrictions. For example, A4SWIFT assumes you to use MQSeries Adapter in conjuntion with IBM WebSphere MQ.



this.correlationId = MXRRUtils.GetMXMQCorrelationID(inMsg.Context);
if (string.IsNullOrEmpty(MXRRUtils.GetMXMQCorrelationID(inMsg.Context)))


public static string GetMXMQCorrelationID(IBasePropertyBag ctx)
{
string str = (string) ctx.Read(“MQMD_CorrelId”, “http://schemas.microsoft.com/BizTalk/2003/mqs-properties”);
if (!string.IsNullOrEmpty(str))
{
return str.ToUpper(CultureInfo.InvariantCulture);
}
return null;
}


These codes are from Microsoft.Solutions.FinancialServices.SWIFT.PipelineComponents.MXRR pipeline component which is used by both Receive and Send Pipeline for MX messaging. More importantly, this is a logic that A4SWIFT correlates between messages. So you may end up having to write your own pipeline component for A4SWIFT in case you have to talk to SAA through files.

[Deployment] Change Destination location before making .msi

If you do not change a Destination location before exporting the application to .msi, default value will be like below.


default destination location


In this case, even though you set the destination folder location in wizard from .msi, assemblies will be still installed in above location and be GACed. So make sure to change the path using BTAD_InstallDir.


ex) %BTAD_InstallDir%\blahblah.dll


for more Pre- and Post-processing Script Environment Variables, reference :


http://msdn.microsoft.com/en-us/library/aa559790%28v=BTS.20%29.aspx

SWIFT Gotcha

Reference : Getting Started with SWIFTStandards, Primer to SWIFT Messaging (http://www.swiftcommunity.net/)


- What is SWIFT ? The acronym stands for Society for Worldwide Interbank Financial Telecommunication (a cooperative society).


- SWIFT developed its original messaging service, FIN, based on proprietary message standards. Later, support for standards on FIN was extended to include ISO 15022 standards and the service name was changed to SWIFTNet FIN. Message types that operate on SWIFTNet FIN are referred to as MTs. More information on ISO 15022 can be found on www.iso15022.org.


- In 1997 SWIFT launched SWIFTNet, an IP-based secure network. This network allows the exchange of message types represented in XML format. It provides support for message standards ISO 20022 and for FpML (for more information, please refer respectively to www.iso20022.org and www.isda.org). Messages Types of standard ISO 20022 are referred to as MXs.


: A4SWIFT provides message communication and connectivity to SWIFT Network using the SWIFTNet Link(SNL). SWIFT Provides multiple ways of connecting to the SWIFTNet Link and one of the important connectivity options is the SWIFT Alliance Access(SAA).


- As financial products and services grew dramatically over the last few decades, there was a major need for additional message standards. In the late 90s, the SWIFTStandards MX messages (MXs), were introduced.


- Today the network traffic of MT still represents the majority of SWIFT traffic.


- At the highest level, an MX message is categorised by its Business Area, represented by four (rather meaningful) letters. For example, ‘camt’ stands for the ‘Cash Management’ Business Area. The table bellow gives an overview of some MX Business Areas:


imageOne level deeper, three digits are identifying the Message Functionality.
At the next level, another three digits identify the Variant ID (often, but certainly not always, ’001′).
Finally, the last two digits identify the Version Number.


Note: Each level is separated by a dot. Hence, the regular expression of an MX Message Type is: [a-z]{4,4}\.[0-9]{3,3}\.[0-9]{3,3}\.[0-9]{2,2}


For example, a pain.001.001.02 MX message identifies a ‘CustomerCreditTransferInitiationV02′ message.


- An MX message contains the business area specific payload. It has the structure defined by the corresponding XML Schema. On www.iso20022.org/index.cfm?item_id=42790 one can download the Schemas as well as samples of the corresponding documents. In addition, the SWIFTSolutions section of the User Handbook (www.swift.com/uhbonline/books/home/index.htm) has more information on message structure but also on message scope and usage, rules and guidelines etc. Note that this requires a subscription.


- The MX message is wrapped as the RequestPayload within the XML envelope. As depicted in the picture below, this request payload contains also the ApplicationHeader. This application header contains general information, its usage is specific to the context of the service.
The following picture represents the request payload:


image – SWIFTNet InterAct is SWIFT’s interactive messaging service supporting the exchange of messages between two parties. Both MTs and MXs are sent over SWIFTNet using SWIFTNet InterAct.
Messages exchanged over SWIFTNet InterAct must be in XML format. In order to send MTs or MXs over SWIFTNet InterAct, the MT or MX message must be wraped in an XML message, also named XML envelope, The MT or MX message becomes the business payload of the XML envelope.
The XML envelope is then sent by invoking a SWIFTNet primitive.
The structure is depicted below by means of an example (in this case containing an MX AdditionalPaymentInformation message (camt.028.001.01)).


image – SWIFTNet FileAct allows secure and reliable transfer of files and is typically used to exchange batches of structured financial messages and large reports
SWIFTNet FileAct supports tailored solutions for market infrastructure communities, closed user groups and financial institutions. SWIFTNet FileAct is particularly suitable for bulk payments, New Global Note certificates and associated documents, securities value-added information and reporting, and for other purposes, such as central-bank reporting and intra-institution reporting.
More information on using FileAct can be found on www.swift.com/index.cfm?Item_id=1048. FileAct works for the end user through a set of XML primitives, exactly like InterAct.


- XML Schema for MX Application Header


image – Users can connect to SWIFT in one of two ways – directly, or indirectly. Direct Connectivity requires a physical connection to SWIFT’s secure IP network (SIPN) as well as the installation and configuration of a set of software products. With Indirect Connectivity, messaging can be established by sharing the connection of another SWIFT user or by outsourcing the day-to-day operation of the connection to a third-party, called a Service Bureau.


Direct Indirect




- The model for integrating SWIFT services into back office applications is composed of three basic layers:
• the Business application,
• the Messaging Interface,
• the Communication interface.


image


The Business application implements the functionality that supports an institution’s business. This layer will need to map against a message standard and send it to, or receive it from, the Messaging interface.


The Messaging interface will typically store the message, validate it and finally route it to the Communication interface. In addition to verifying if the structure of a message is according to the standard, validation also includes aspects such as verifying business relationships and security. A Messaging interface also logs all actions applied to the messages being transmitted and monitors traffic.


The Communication interface provides the functionality to connect the Messaging interface with the network. This includes security (it is the only software accessing SWIFTNet directly, and can be installed in a demilitarised zone); higher resilience (depending on the implementation, the availability of multiple Connection interfaces can support the automatic switching from one path to the other); and cost reduction (traffic of multiple Messaging interfaces can be concentrated in one Communication interface, sharing the same SWIFTNet connection – this is also called Single Window).


———————————————–
https://www.swiftcommunity.net/communities/63/forum/3011/forumPostDetail/19573


- XMLv2 was introduced with Alliance Access release 6.0
  As it was new, it did not contain a Revision element.
- The next release of Alliance Access, release 6.2 contained enhancements that impacted the XMLv2 structure (e.g. native MQ host adapter).
This enhanced XMLv2 envelope was called Revision 1. In this respect the XML v2 Revision 1 XSD contains an additional element called Revision.
The Revision element has to contain the value 2.0.1.


- Now release 6.3 of AA is available, which supports FileAct. The XMLv2 envelope has been enhanced again, the revision is now 2.
———————————————–


For example, the business content of a DataPDU (10£ > 5£) can have this XML representation using the character set ISO-8859-1 and a CDATA section:


<A><![CDATA[10£ > 5£]]> <!– A comment –></A>


This can be transformed to this XML representation using US-ASCII and escaped characters:


<A>10Á &gt; 5Á</A>


The business content is not changed, but the bit stream of the DataPDU is totally different.


———————————————–

[Tools] Pipeline.exe

There are some hidden tools that Microsoft provides out of the box but not often used. One of those is the pipeline.exe It’s located in %BTSInstallDir%SDK\Utilities\PipelineTools\


This is a sample usage that I’ve practiced.



C:\Program Files\Microsoft BizTalk Server 2006\SDK\Utilities\PipelineTools>Pipel
ine.exe ReceivePipeline.btp -d 00590009.out -pf property.xml -p -v

Creating objects.
Using encoding Unicode (UTF-8)
Creating message.
Adding message to a pipeline.
Executing pipeline.
Getting processed message(s).
Doing output for a message 1.


Message 1 context properties:
————————————–


Name = ‘MQMD_CorrelId’ namespace = ‘http://schemas.microsoft.com/BizTalk/2003/mq
s-properties’ value = ‘test1′ promoted = ‘Yes’ type = ‘String’


You can basically test your pipeline with this tool. But the best thing is that you can actually put context properties with your own xml file.



<properties>
<property name=”MQMD_CorrelId” namespaceURI=”http://schemas.microsoft.com/BizTalk/2003/mqs-properties” value=”test1″ />
</properties>


I used this tool to put context property called “MQMD_CorrelId” into pipeline and it worked like a charm. This can actually save a lot of your time when you develop pipeline component.

BAMPrimaryImport 의 DB Ownership

안녕하세요. 김현수입니다.

BAMPrimaryImport 의 DB Ownership 은 절대 ‘sa’ 가 되선 안됩니다. BAM Portal 을 볼 수가 없게 되지요. 이유는 아래 잘 설명되어 있습니다.

http://blogs.msdn.com/tihot/archive/2006/06/13/630313.aspx

감사합니다.

어셈블리 강제 Singing하기

안녕하세요. 김현수입니다.

요즘 OpenEdge Progress 라는 4GL DB의 WCF LOB Adapter 를 만들고 있습니다. 원래 자바 베이스라 닷넷용 Proxy Assembly Generator 로 Proxy Assembly 생성후 참조해서 사용합니다.

WCF Adapter 어셈블리는 항상 GAC에 올려야 하므로 strong name 이라야 합니다. 어댑터가 참조하는 닷넷 어셈블리도 마찬가지지요. 하지만 위의 경우처럼 Third party 일 경우 닷넷용 Proxy Assembly 에 키를 적용해서 다시 생성해달라고 하기 힘들 수가 있습니다.

이 때 사용할 수 있는 방법은 두가지입니다. 해당 어셈블리를 verification skipping 대상으로 등록하던가, 강제 singing 하던가.

SN.exe -Vr thirdparty.dll // verification skipping

// force siging
Use Microsoft intermediate language (MSIL) Disassembler to disassemble the assembly:
ILDASM.exe thirdparty.dll /out:thirdparty.il

Then, use MSIL Assembler to reassemble the assembly with a strong name:
ILASM.exe thirdparty.il /dll /key=strongkeyfile.snk

Progress 의 Proxygen 은 키를 적용할 수 있기 때문에 위 방법까지 쓸 필요는 없었지만 담당자가 일처리를 해주기까지 꽤 오래 기다려야 했습니다. Progress 가 설치된 서버에서만 실행되고, 따로 소스는 없고 어셈블리만 딸랑 떨구거든요.

참조 : Do we need to GAC the adapter assembly?

감사합니다.

능률적인 프로그래머 예약 판매 시작!

안녕하세요. 역자 김현수입니다.

제가 한국을 떠나오기 직전인 올초 1~3월간 작업했던 <능률적인 프로그래머>가 드디어 세상의 빛을 보는군요.

역자 서문에도 궁상을 떨었지만 번역이란 정말 외롭고 쓸쓸한 싸움입니다. 번역하는 동안 하도 앉아 있었더니 엉덩이도 많이 커진 거 같습니다. ^^

난생 처음 해보는 힘겨운 작업이었는데 이렇게 책으로까지 만들어진 걸 보니 정말 감개무량합니다. 아직 저조차 손에 받아보지 못했는데 배송되려면 좀 더 기다려야겠군요.

책의 주제는 ‘프로그래머 개인의 능률 향상’입니다. 여럿이서 협업시 생산성을 높이는 방법에 대한 책은 많지만 개개인의 능률 향상 비법을 다룬 책은 드문 듯 합니다.

하지만 주제와 무관하게 전 번역하는 동안 “프로그래머로서 행복해지는 법”에 대해 많이 생각해 보게 되었습니다.

대한민국의 개발자는 피곤합니다. 불합리한 산업 구조, 조직내 상하 관계, 무능한 관리자, 허구한날 야근… 프로그래머로서의 자긍심은 이제 온데간데 없습니다. 생산성? 능률? 자기 개발? 끼어들 여지조차 없습니다.

개발자 커뮤니티에 가보면 허구한 날 공무원 시험이나 준비해야겠다거나, 임금이 체불됐다거나, 야근 기록을 경신했다거나 하는 우울한 글들 뿐입니다. 희망을 말 해주는 이는 극히 소수입니다.

그렇다면 과연 프로그래머의 행복이란 일찍 집에 들어가 가족들과 많은 시간을 보내고, 돈을 좀 더 벌 수만 있다면 족한걸까요?

긍정 심리학의 대가, 칙센트미하이 박사는 말합니다.

“좋은 음식, 친구, 휴식 등도 행복을 느끼는 방편이 될수 있지만 오래 지속되지는 않는다. 사람은 몰입을 통해 한 단계씩 좀 더 어려운 과제에 도전하고, 실력이 성장하는 걸 보면서 보람을 느끼는데 이는 생존에 매우 중요할 뿐 아니라, 지속적으로 행복을 느끼는 방법중 하나다.”

저는 직업인으로서의 행복은 이렇듯 자신이 하는 일에 긍지를 갖고 좀 더 나아지기 위해 노력을 집중하는데 있다고 생각합니다. 단지 주어진 일만 하기보다, 오늘의 자신보다 더 나아지려고 노력하는 대다수의 한국의 프로그래머를 위해 이 책을 바칩니다.

감사합니다.

== 연관글 ==
2009/06/20 – [최근 소식] – 능률적인 프로그래머 베타 리딩 완료
2009/03/07 – [최근 소식] – 최선의 선택에 매달리지 않기

BizTalk 환경 재설정하기

안녕하세요. 김현수입니다.

BizTalk 환경을 재설정해야 하는 경우는 많습니다. 혼자 쓰는 개발 환경일 경우 특히 그렇지만 UAT, Staging 이나 Production 환경에서도 가끔 필요할 때가 있습니다. 이럴 때 필요한 절차를 정확하게 알고 있어야 시행 착오를 막을 수 있습니다.

아주 잘 정리된 설명과 이를 자동화한  msbuild 샘플입니다.

감사합니다.

=> BizTalk 관련 국내 최고 KB가 되겠습니다. 구독 신청해주세요~!!

Powershell 을 통한 BizTalk App 배포

안녕하세요. 김현수입니다.

BizTalk App을 배포하는 방법엔 여러가지가 있습니다. 개발 환경, QA 환경, 운영 환경이 분리되어 있지 않은 경우 개발자가 전부 수동으로 일일히 배포하는 게 가장 확실할 수 있지만 그렇지 않다면 비 BizTalk 전문가인 테스트, 운영 요원들이 정확한 순서대로 배포를 마칠 수 있도록 추가 작업이 필요합니다.

MSI  배포시 Powershell 스크립트를 Post-Script 로 설정해 필요한 작업을 처리해주는 예제샘플입니다.

=> BizTalk 관련 국내 최고 KB가 되겠습니다. 구독 신청해주세요~!!

Windows 7 Ultimate 64bit 설치

안녕하세요. 김현수입니다.

MSDN/TechNet 에 Windows 7 이 정식 등록 됐다는 소식을 듣고 이제까지 미뤄왔던 Windows 7 을 설치해 봤습니다. 기존에 Vista Ultimate 64bit 를 만족스럽게 쓰고 있었기 때문에 딱히 Windows 7 으로 갈아탈 이유는 없었지만 일단 갈아타고 보니 여러 가지 개선 사항이 보이고, 맘에 듭니다.

일단 저는 레노보 Thinkpad R61 을 사용하고 있는데 비스타 설치시 삭제 못했던 복구 영역 파티션을 깔끔히 날려버릴 수 있어 좋았습니다. 복구 영역의 필요성을 못느껴 다음에 OS 다시 깔 때는 꼭 지워버려야겠다고 다짐했었거든요. ^^

눈에 띄는 개선 사항은 작업 표시줄(Taskbar)의 변화입니다. 개수가 늘어나면 효용성이 급격히 떨어지는 빠른 실행(Quick Launch)이 없어졌습니다. 맥 OS X 의 독(Dock)에 아이디어를 얻어 개선한 게 아닐까 싶군요. 효율성 측면에서 기존 작업 표시줄을 신랄히 비판했던 “능률적인 프로그래머”의 저자 닐 포드도 이번만은 MS의 디자인을 칭찬해줄 듯 싶습니다.

트레이(Tray)도 크게 변화됐습니다. 트레이에 등록되는 프로그램들의 아이콘을 보여줄지 말지, 알림을 활성화 할지 말지 등을 사용자가 선택할 수 있게 됐군요. 지나치게 자주 알림, 경고 메시지를 표시해 집중을 방해했던 점 역시 “능률적인 프로그래머”가 지적한 기존 Windows 의 단점이었습니다. 비스타에선 윈도우즈가 자주 쓰는 아이콘을 판별해 보여줬는데 7 의 방식이 훨씬 더 맘에 듭니다.

아, 도아님의 글에서 Windows 7 에서 IE 가 빠진다고 읽은 거 같아 그런가 보다 했는데 설치된 걸 보니 IE 가 깔려있더군요. Windows 7 설치 시작 눌러놓고 TV 보다 다 끝나고 와서 설치 과정 중에 IE 를 뺄지 말지 선택하는 게 있었는지는 모르겠습니다. ^^;

그러고보니 한 가지, 무선 랜 잡을 때 재미있는 버그를 발견했습니다. Security Type 으로 WEP 를 쓰고 있는데 트레이 아이콘을 눌러 접속을 시도하니 user name 과 password 를 넣으라는군요. ㅎㅎㅎ; 미리 설정한 64 bit key 하나만 넣으면 되는데 왠 user name? 해결책은 간단합니다. 다음 순서대로 수동으로 연결을 설정해주시면 됩니다.

1. Network and Sharing Center
2. set up a new connection or network
3. Manually connect to a wireless network

Windows 7 포럼을 뒤져보니 이 문제로 고생하고 있다는 글이 몇 개 보이네요. 일반인이라면 난감해 할 만 합니다.

이제 입맛에 맞게 조금씩 변화를 줘 봐야겠네요. 맥북을 지를까 말까 고민하던 중인데 좀 더 버텨볼까요? ㅎㅎ

== Windows 7 참조 사이트 ==
http://arch7.net
http://offree.net
http://choboweb.com
Windows 7 단축키 모음

감사합니다.