问题
We're working on using BizTalk generate a valid SWIFT message (initially MT 103) and dropping it onto an endpoint. However, we're struggling to generate a valid message.
(Similar, but different question, at this StackOverflow post. I broke the questions up because they are materially different.)
Given a populated A4SWIFT MT103 schema (namespace: http://schemas.microsoft.com/BizTalk/Solutions/FinancialServices/SWIFT/Categroy1/MT103
), we're passing that through the SWIFT Assembler on a Pipeline, out of which we get a "flat" SWIFT MT 103 message.
We get a SWIFT message like that below (obviously false):
{1:F01ABCDEFGXAXXX0000000000}{2:I103ABCDEFGHXXXXN}{3:{108:143136}
:20:ABCDEF123456
:23B:CRED
:32A:170607USD500,1
:33B:USD500,1
:50F:/0000000000
Bible Baggins
1 Bag End
Hobbiton
ME1
:53A:/00000000
ABCDEFGXXXX
:57A:ABCDEF
:59F:/00000000000000
CashYourJewelleryFast.com
:71A:OUR
-}
Notice that Block 3 hasn't been terminated correctly and that Block 4 doesn't start correctly.
I'm missing the characters: }{4:
Dijkgraaf asked for the original XML. This is shown below (anonymised as best as I can to match the example):
<ns1:SWIFT_CATEGORY1_MT103_Interchange
xmlns:ns1="http://schemas.microsoft.com/BizTalk/Solutions/FinancialServices/SWIFT/Category1/MT103"
xmlns:ns0="http://schemas.microsoft.com/BizTalk/Solutions/FinancialServices/SWIFT/BaseTypes"
xmlns:ns2="http://schemas.microsoft.com/BizTalk/Solutions/FinancialServices/SWIFT/DataTypes">
<SWIFTHeader>
<BasicHeaderBlock>
<ApplicationIdentifier>F</ApplicationIdentifier>
<ServiceIdentifier>01</ServiceIdentifier>
<LTAddress>ABCDEFGXAXXX</LTAddress>
<SessionNumber>0000</SessionNumber>
<SequenceNumber>000000</SequenceNumber>
</BasicHeaderBlock>
<ApplicationHeaderBlock_Input>
<MessageType>103</MessageType>
<DestinationAddress>ABCDEFGHXXXX</DestinationAddress>
<MessagePriority>N</MessagePriority>
</ApplicationHeaderBlock_Input>
<UserHeaderBlock>
<MessageUserReference_108>
<Reference>143136</Reference>
</MessageUserReference_108>
</UserHeaderBlock>
</SWIFTHeader>
<SWIFT_CATEGORY1_MT103>
<SendersReference_20>
<Reference>ABCDEF123456</Reference>
</SendersReference_20>
<BankOperationCode_23B>
<Type>CRED</Type>
</BankOperationCode_23B>
<ValueDateCurrencyInterbankSettledAmount_32A>
<Date>170607</Date>
<Currency>USD</Currency>
<Amount>500,1</Amount>
</ValueDateCurrencyInterbankSettledAmount_32A>
<CurrencyInstructedAmount_33B>
<Currency>USD</Currency>
<Amount>500,1</Amount>
</CurrencyInstructedAmount_33B>
<OrderingCustomer_50F>
<OrderingCustomerIdentification_1>
<Account>0000000000</Account>
</OrderingCustomerIdentification_1>
<NameAndAddress>
<Line1>
<nameAndAddressLineType_1>Bilbo Baggins</nameAndAddressLineType_1>
</Line1>
<Line2>
<nameAndAddressLineType_1>1 Bag End</nameAndAddressLineType_1>
</Line2>
<Line3>
<nameAndAddressLineType_1>Hobbiton</nameAndAddressLineType_1>
</Line3>
<Line4>
<nameAndAddressLineType_1>ME1</nameAndAddressLineType_1>
</Line4>
</NameAndAddress>
</OrderingCustomer_50F>
<SendersCorrespondent_53A>
<PartyIdentifier>
<Identifier>00000000</Identifier>
</PartyIdentifier>
<BankIdentifierCode>
<BankCode>ABCD</BankCode>
<CountryCode>EF</CountryCode>
<AreaCode>GH</AreaCode>
<BranchCode>XXX</BranchCode>
</BankIdentifierCode>
</SendersCorrespondent_53A>
<AccountWithInstitution_57A>
<BankIdentifierCode>
<BankCode>ABCD</BankCode>
<CountryCode>EF</CountryCode>
<AreaCode>EF</AreaCode>
<BranchCode>XXX</BranchCode>
</BankIdentifierCode>
</AccountWithInstitution_57A>
<BeneficiaryCustomer_59F>
<Account>
<Account>00000000000000</Account>
<NameAndAddress>
<Line1>
<nameAndAddressLineType_1>CashYourJewelleryFast.com</nameAndAddressLineType_1>
</Line1>
</NameAndAddress>
</Account>
</BeneficiaryCustomer_59F>
<DetailsOfCharges_71A>
<Code>OUR</Code>
</DetailsOfCharges_71A>
</SWIFT_CATEGORY1_MT103>
</ns1:SWIFT_CATEGORY1_MT103_Interchange>
I've checked the generated MT 103 message with known valid MT 103 messages generated in other systems and I'm confidence the details are present and in the correct format.
I suspect BizTalk/A4SWIFT have a bit of a fit when something is wrong and generates a half-created message.
Is there something I am missing? Where can I find actual errors associated with this, as opposed to just the counts? I can generate <UnparsedMessages />
and can route errors around based on the promoted properties but they don't contain any useful information.
来源:https://stackoverflow.com/questions/44524723/a4swift-on-biztalk-generating-a-valid-mt103-how-to-understand-why-a-message-is