locked
A4Swift Error RRS feed

  • Question

  • Hi, I'm new to A4Swift, but have some experience on Biztalk for regular messages.  I installed A4Swift for Biztalk 2013 R2 and followed the steps described in Microsoft tutorial: https://msdn.microsoft.com/en-us/library/ee350674.aspx. First I got an error on validating the sample flat file MT103_Sample.txt because there were two nodes (MAC: & PAC:) in the trailer not specified in MT103.xsd. So I removed them and everything seemed working fine. The validating instance parsed the sample file properly. I then created a flat file receiving port with Swift Disassembler and a sending port with PassThruTransmit pipeline, to my surprise the output is a unparsed message:

    <?xml version="1.0"?>
    -<UnParsedMessage>
    <![CDATA[{1:F01BOFAUSNYJXXX4321000123}{2:I103BANKDEFFAXXXN2020}{3:{103:CAD}}{4: :20:NY20040126000111 :23B:CRED :32A:040116USD1000000,00 :50K:/987654321 Big Deal Real Estate Madison Avenue New York, NY USA :57A:/654321 NOSCATTT :59:/1234567890123 I. Buy Buildings 200 Front Street Toronto, Ontario Canada :70:re real estate purchase 10000 King Street East Toronto :71A:OUR -}{5:{CHK:123456789012}{SYS:1231313}{TNG:}{PDE:12345}{DLM:}}]]>
    </UnParsedMessage>

    If I set the sending pipeline to XMLTransmit I would get this error:

    A message sent to adapter "FILE" on send port "MT103_XML_SendPort" with URI "C:\Biztalk\Swift\OutBound\%MessageID%.xml" is suspended. 
     Error details: There was a failure executing the send pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLTransmit, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML assembler" Send Port: "MT103_XML_SendPort" URI: "C:\Biztalk\Swift\OutBound\%MessageID%.xml" Reason: This Assembler cannot retrieve a document specification using this type: "UnParsedMessage".   
     MessageId:  {8F528A9A-6EF2-4CE2-8B83-9AFE758C3B39}
     InstanceID: {9F3B5BF1-DECB-40AE-B3BA-727E54AD50E1}
     
     What did I miss or do wrong? Also in Swift Disassembler I only specified the Swift Header Schema=Micrsoft.Solutions.FinancialServices.SWIFT.RuntimeSchemas.HeaderSchema as instructed, but how did the parser know it was for MT103 but not something else?  In regular flat file disassember there is a propery called Document Schema so I can tell it to parse according to that schema, do we have similar thing for Swift?
     
     Many thanks,
     Jack
    • Edited by selits19 Monday, May 16, 2016 11:42 AM
    Monday, May 16, 2016 1:35 AM

Answers

  • Hi Jack

    What this means is that this message is failing at parsing stage/validation, etc.

    Please create a SendPort with a Filter as Microsoft.Solutions.A4SWIFT.Property.A4SWIFT_Failed == true, you will be able to get all failed SWIFT messages using this. Keep this SendPort in stopped state, so that this failed message gets Suspended in BizTalk, and you can inspect why this failed.

    There are some promoted properties on this failed message that will help you debug this -

    You can identify a message that A4SWIFT has published to the MessageBox database as failed or erroneous by its promoted properties. When processing a failed message, the SWIFT disassembler populates and promotes the A4SWIFT_Failed property, and one or more of the other following properties, before publishing the message to the MessageBox database:

    • A4SWIFT_ParseErrors indicates the number of parsing errors (such as malformed data) encountered during processing.
    • A4SWIFT_XmlValidationErrors indicates the number of XML validation errors (such as invalid data or incorrect type with respect to the schema) encountered during processing.
    • A4SWIFT_BreValidationErrors indicates the number of Business Rule Engine (BRE) validation errors (such as data that breaks a SWIFT network rule) encountered during processing.
    • A4SWIFT_Failed is true when the count of any the above properties is greater than zero, or false when the count is equal to zero.

    Ref-

    https://msdn.microsoft.com/en-us/library/ee350725.aspx


    Thanks Arindam

    • Marked as answer by selits19 Tuesday, June 7, 2016 4:03 PM
    Monday, May 16, 2016 1:55 AM
    Moderator
  • Hi Rachit, no I did not install Message Pack 2015.  I downloaded en_biztalk_server_2013_r2_standard_edition_x86_and_x64_dvd_4434625.iso and installed both Biztalk server (Setup.exe dated 6/1/2014 6:52 PM) and BizTalk Accelerators (Setup.exe dated 1/31/2014 10:13PM) from that.  After installation of the accelerator, I got two folders one is "Microsoft BizTalk Accelerator for SWIFT" and other "Microsoft BizTalk Accelerator for SWIFT 2013 Message Pack".
    Few important pointers:

    1) Once you install Swift Accelerator and Message Pack you got two set of Swift schema one Inside Accelerator and one in Message pack ,So Please make sure you added all schemas from Message pack.

    Delete existed Microsoft.Solutions.FinancialServices.SWIFT.RuntimeSchema which is already deployed and add it from Message Pack in your BizTalk application and gac it.

    2) With BizTalk Server 2013 R2, the correct SWIFT Header Schema value to specify is "SWIFTSchemas.SWIFTHeader" ,  instead of the value indicated by the tutorial (i.e., not"Micros...SWIFT.RuntimeSchemas.HeaderSchema"). Refer: http://mwan.blogspot.in/2012/05/big-gotcha.html

    3) There could be database permission issue. The Log On account for the BizTalk service, is not included in the A4SWIFT Administrators and A4SWIFT Users groups. Add the Log On account for the BizTalk service to the A4SWIFT Administrators and A4SWIFT Users groups.

    Also refer to : Microsoft BizTalk 2013 and 2013 R2 Accelerator for SWIFT (A4SWIFT) Documentation. A4SWIFT2013R2Help.chm for troubleshooting and known issues.


    Rachit Sikroria (Microsoft Azure MVP)

    • Proposed as answer by Angie Xu Monday, May 23, 2016 1:35 AM
    • Unproposed as answer by selits19 Wednesday, May 25, 2016 2:19 AM
    • Marked as answer by selits19 Tuesday, June 7, 2016 4:04 PM
    Wednesday, May 18, 2016 8:31 PM
    Moderator

All replies

  • Hi Jack

    What this means is that this message is failing at parsing stage/validation, etc.

    Please create a SendPort with a Filter as Microsoft.Solutions.A4SWIFT.Property.A4SWIFT_Failed == true, you will be able to get all failed SWIFT messages using this. Keep this SendPort in stopped state, so that this failed message gets Suspended in BizTalk, and you can inspect why this failed.

    There are some promoted properties on this failed message that will help you debug this -

    You can identify a message that A4SWIFT has published to the MessageBox database as failed or erroneous by its promoted properties. When processing a failed message, the SWIFT disassembler populates and promotes the A4SWIFT_Failed property, and one or more of the other following properties, before publishing the message to the MessageBox database:

    • A4SWIFT_ParseErrors indicates the number of parsing errors (such as malformed data) encountered during processing.
    • A4SWIFT_XmlValidationErrors indicates the number of XML validation errors (such as invalid data or incorrect type with respect to the schema) encountered during processing.
    • A4SWIFT_BreValidationErrors indicates the number of Business Rule Engine (BRE) validation errors (such as data that breaks a SWIFT network rule) encountered during processing.
    • A4SWIFT_Failed is true when the count of any the above properties is greater than zero, or false when the count is equal to zero.

    Ref-

    https://msdn.microsoft.com/en-us/library/ee350725.aspx


    Thanks Arindam

    • Marked as answer by selits19 Tuesday, June 7, 2016 4:03 PM
    Monday, May 16, 2016 1:55 AM
    Moderator
  • Hi Arindam,

    Thanks for replying.  I assigned the sample flat file as schema MT103.xsd's Input Instance Filename and then right click on the schema and select "Validate Instance" option and I got:

    The Child Delimiter Type property is not set for a delimited record. C:\Biztalk\Swift\MT103_Sample.txt: error BEC2004: Unexpected data found while looking for:
    '{SYS:'
    '{TNG:}'
    '{PDE:'
    '{RTV:}'
    '{MRF:'
    '{PDM:'
    '{DLM:}'
    '}'
    '{CHK:'
    The current definition being parsed is AllTrailerBlocks. The stream offset where the error occured is 387. The line number where the error occured is 20. The column where the error occured is 5.
    C:\biztalk\swift\SwiftProject\SwiftProject\MT103.xsd: error BEC2004: Validate Instance failed for schema MT103.xsd, file: <file:///C:\Biztalk\Swift\MT103_Sample.txt>.
    Component invocation succeeded.

    Another weird thing is that Microsoft.Solutions.A4SWIFT.Property.A4SWIFT_Failed property does not show in my Filters property list.  I checked that Micrsoft.Solutions.FinancialServices.SWIFT.RuntimeSchemas.dll is in the GAC.  Do you have any idea why that is the case?

    Many thanks,

    Jack

    Monday, May 16, 2016 6:52 PM
  • Did you install the correct Message Pack for the message you're receiving?  SWIFT is pretty strict about versions.
    Monday, May 16, 2016 8:25 PM
    Moderator
  • Hi,

    Have you installed Swift Message Pack 2015?

    After you install Microsoft BizTalk Accelerator for Society for Worldwide Interbank Financial Telecommunication (SWIFT) Message Pack 2015 with Microsoft BizTalk Server 2013 R2 Accelerator for SWIFT, messages of MT103 REMIT type are not validated against the MT103 REMIT schema and business rules.

    An update to the MT message disassembler is included in Microsoft BizTalk Server 2013 R2 Cumulative Update 1 which causes it to identify MT103 REMIT messages as MT103 REMIT messages. After this Cumulate Update is installed, the MT103 REMIT schema and business rules that are included in BizTalk Accelerator for SWIFT Message Pack 2015 will be effective.



    Rachit Sikroria (Microsoft Azure MVP)

    Tuesday, May 17, 2016 2:48 AM
    Moderator
  • Hi

    Are you seeing the Micrsoft.Solutions.FinancialServices.SWIFT.RuntimeSchemas.dll as a resource in BizTalk Group > Applications > All Artifacts from Admin Console?

    I suspect that the SWIFT installation/configuration may not have happened cleanly.

    Maybe you can add/overwrite this assembly as a resource taking this assembly from the SWIFT installation folder (Microsoft BizTalk Accelerator for SWIFT\Assemblies). Go to Resources node in the application in BizTalk Admin Console -> Add -> Browse to this assembly and check all the checkboxes for GAC, overwrite etc. Close and open Admin Console. You should get the SWIFT properties.


    Thanks Arindam




    Tuesday, May 17, 2016 5:02 AM
    Moderator
  • The Micrsoft.Solutions.FinancialServices.SWIFT.RuntimeSchemas.dll is in All Artifacts list and in GAC folder.  I tried to add it to the application resource but got an error saying "Micrsoft.Solutions.FinancialServices.SWIFT.RuntimeSchemas, Version=3.2.0.0 Culture=neutral, PublicKey=...") already in store."  I tried Gacutil to re-register  it but did not help.

    Thanks, Jack


    • Edited by selits19 Wednesday, May 18, 2016 3:06 PM
    Wednesday, May 18, 2016 2:54 PM
  • If it's already there, the A4SWIFT properties should show up in Filters. Can you close and re-open Admin Console and check?


    Thanks Arindam

    Wednesday, May 18, 2016 3:02 PM
    Moderator
  • Hi Rachit, no I did not install Message Pack 2015.  I downloaded en_biztalk_server_2013_r2_standard_edition_x86_and_x64_dvd_4434625.iso and installed both Biztalk server (Setup.exe dated 6/1/2014 6:52 PM) and BizTalk Accelerators (Setup.exe dated 1/31/2014 10:13PM) from that.  After installation of the accelerator, I got two folders one is "Microsoft BizTalk Accelerator for SWIFT" and other "Microsoft BizTalk Accelerator for SWIFT 2013 Message Pack".
    Wednesday, May 18, 2016 3:02 PM
  • I did it at least five times, including rebooting my machine twice.
    Wednesday, May 18, 2016 6:02 PM
  • Could you try one final thing - remove the assembly from All Artifacts -> Resources. Add it back using Resources->Add from the path I mentioned earlier. Check all the checkboxes. Close and re-launch Admin Console.

    Thanks Arindam

    Wednesday, May 18, 2016 6:06 PM
    Moderator
  • Hi Arindam, besides that issue, do I have to tell the receivepipeline / disassembler to parse a flatfile based on a specific schema? Based on the tutorial I only have to assign the property "Swift Header Schema"  to Micrsoft.Solutions.FinancialServices.SWIFT.RuntimeSchemas.HeaderSchema which is very generic.

    Thanks, Jack

    Wednesday, May 18, 2016 6:14 PM
  • Hi Jack

    No, the SWIFT Dasm dynamically discovers the message type and resolves the document schema-

    https://msdn.microsoft.com/en-us/library/ee350675.aspx


    Thanks Arindam

    Wednesday, May 18, 2016 6:25 PM
    Moderator
  • Hi Rachit, no I did not install Message Pack 2015.  I downloaded en_biztalk_server_2013_r2_standard_edition_x86_and_x64_dvd_4434625.iso and installed both Biztalk server (Setup.exe dated 6/1/2014 6:52 PM) and BizTalk Accelerators (Setup.exe dated 1/31/2014 10:13PM) from that.  After installation of the accelerator, I got two folders one is "Microsoft BizTalk Accelerator for SWIFT" and other "Microsoft BizTalk Accelerator for SWIFT 2013 Message Pack".
    Few important pointers:

    1) Once you install Swift Accelerator and Message Pack you got two set of Swift schema one Inside Accelerator and one in Message pack ,So Please make sure you added all schemas from Message pack.

    Delete existed Microsoft.Solutions.FinancialServices.SWIFT.RuntimeSchema which is already deployed and add it from Message Pack in your BizTalk application and gac it.

    2) With BizTalk Server 2013 R2, the correct SWIFT Header Schema value to specify is "SWIFTSchemas.SWIFTHeader" ,  instead of the value indicated by the tutorial (i.e., not"Micros...SWIFT.RuntimeSchemas.HeaderSchema"). Refer: http://mwan.blogspot.in/2012/05/big-gotcha.html

    3) There could be database permission issue. The Log On account for the BizTalk service, is not included in the A4SWIFT Administrators and A4SWIFT Users groups. Add the Log On account for the BizTalk service to the A4SWIFT Administrators and A4SWIFT Users groups.

    Also refer to : Microsoft BizTalk 2013 and 2013 R2 Accelerator for SWIFT (A4SWIFT) Documentation. A4SWIFT2013R2Help.chm for troubleshooting and known issues.


    Rachit Sikroria (Microsoft Azure MVP)

    • Proposed as answer by Angie Xu Monday, May 23, 2016 1:35 AM
    • Unproposed as answer by selits19 Wednesday, May 25, 2016 2:19 AM
    • Marked as answer by selits19 Tuesday, June 7, 2016 4:04 PM
    Wednesday, May 18, 2016 8:31 PM
    Moderator
  • Thanks to both Arindam and Rachit, I have made some progress.  I figured out why Microsoft.Solutions.A4SWIFT.Property.A4SWIFT_Failed property did not show in my Filters property list.  I initially deployed my application without an app name so it used the default one called "Biztalk Application 1" and Microsoft.Solutions.FinancialServices.SWIFT.RuntimeSchema.DLL was added to its resource list; It sounds odd but seemed to me that that Dll was not shared across all applications, because when I later deployed my app with an assigned application name (the previous one was removed) that property won't show.  Now I removed that DLL from the default application resource and added it to my application resource I got the property available.  All that is good.

    Now I tried to send a swift message MT103 with a Filter Microsoft.Solutions.A4SWIFT.Property.A4SWIFT_Failed == true, I got A4Swift_ParseErrors=1.  I validated the flat file (by right click) and everything was parsed okay though.  I also tried changing the "Swift Header Schema" to the one called "SWIFT Header.xsd" coming with the installation but it did not help.  I assumed that's what Rachit meant cause I could not find anything called "SWIFTSchemas.SWIFTHeader".  Could you explain why the Parse Error happened?

    Many thanks, Jack

    Thursday, May 19, 2016 1:32 AM
  • Hi 

    Are any CUs like CU1 or CU2 installed for BizTalk Server 2013 R2? Launch appwiz.cpl from Run -> View Installed Updates.

    If yes, I guess it is best to unconfigure/uninstall SWIFT altogether, and only install/configure the bits from the Message Pack folder, as Rachit suggested.

    Refer the doc file here- https://www.microsoft.com/en-in/download/details.aspx?id=40299

    If you are on baseline BizTalk Server 2013 R2(no CUs) however, then make sure you don't install any bits from the MessagePack folder to make the samples work.


    Thanks Arindam

    • Proposed as answer by Angie Xu Monday, May 23, 2016 1:35 AM
    • Unproposed as answer by selits19 Wednesday, May 25, 2016 2:19 AM
    Thursday, May 19, 2016 5:20 AM
    Moderator
  • Hi Rachit,

    Many thanks for the instructions, but unfortunately the same parse error won't go away.  Here is what I did: 1> I first deleted my biztalk app, removed a4swift reference from my app and then unstalled the a4swift, reboot my machine and then reinstalled the a4swift, using gacutil to override the dll with the one in Swift 2013 Message Pack, added the reference from the same location in VS;  2> With this new dll, I did find "SWIFTSchemas.SWIFTHeader" property so I used it as "Swift Header Schema" in my app; 3> Neither A4SWIFT Administrators nor A4SWIFT Users was in my Biztalk Log On group so I added both. Are there anything else you could think of I have missed?  A million thanks. (I never manually installed any Biztalk server updates) 

    Another thing I noticed was that by following the tutorial to run BRE Deployment Utility  I could not find any log info on deployment (I checked directory C:\Users\jww\AppData\Roaming\Microsoft\BizTalk Server\Deployment but found nothing).  Next when I opened Business Rule Composer I found none of the A4Swift stuff shown in the vocabulary list.  Could it be that I've missed something?

    Jack



    • Edited by selits19 Wednesday, May 25, 2016 2:41 PM
    Tuesday, May 24, 2016 2:15 PM