Microsoft KB Archive/923531

= FIX: Field contents may be truncated when you use the BizTalk Server 2004 Flat File Assembler to serialize and then send a SWIFT FIN message to SWIFT =

Article ID: 923531

Article Last Modified on 11/15/2007

-

APPLIES TO

 Microsoft BizTalk Accelerator For SWIFT 2.1 Enterprise Edition Microsoft BizTalk Accelerator For SWIFT 2.1 Standard Edition, when used with:  Microsoft BizTalk Server 2004 Enterprise Edition

 Microsoft BizTalk Server 2004 Developer Edition

 Microsoft BizTalk Server 2004 Standard Edition

 Microsoft BizTalk Server 2004 Partner Edition</li></ul> </li></ul>

-

<div class="symptoms_section">

SYMPTOMS
When you use the Microsoft BizTalk Server 2004 Flat File Assembler (FF ASM) to serialize and then send a SWIFT FIN message to SWIFT, SWIFT receives the message as expected. However, some field contents may be truncated. Characters may be missing from certain fields in the message.

You experience this problem if the following conditions are true:
 * You use the Microsoft BizTalk Server Accelerator for SWIFT to send the message.
 * The message has one or more fields that do not comply with the SWIFT schema specifications.

Note You may want to configure the Flat File Assembler to serialize and then send the message if you want BizTalk Server to deliver the message to SWIFT regardless of whether a message field complies with the schema specification.

<div class="cause_section">

CAUSE
This problem occurs because the Flat File Serializer component currently forces the .xml file to comply with the SWIFT schema specifications.

For example, consider the following scenario:
 * You send a message that contains four characters in message field 95P.
 * Because the schema specification allows for only three characters in this field, BizTalk Server Accelerator for SWIFT sets the value of the A4SWIFT_Failed property to true when BizTalk Server Accelerator for SWIFT parses the message to XML. This value indicates that the message is invalid because it does not comply with the schema specifications.
 * Because the message is invalid, the send port in BizTalk Server Accelerator for SWIFT does not process the message.
 * Because you want to deliver this message to SWIFT regardless of whether the message field complies with the schema specification, you configure a Flat File Assembler to serialize and then send the message to SWIFT.
 * The Flat File Serializer component of the Flat File Assembler truncates the contents of message field 95P to force the field to comply with the schema specification. Therefore, when the message leaves BizTalk Server 2004, the Flat File Serializer component has truncated message field 95P to contain only three characters.

Note In this scenario, SWIFTNET does not detect that the message is invalid because the Flat File Assembler has forced the message contents to fit within the schema specifications.

<div class="resolution_section">

Hotfix information
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Prerequisites
No prerequisites are required to apply this hotfix.

Restart requirement
You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information
The Microsoft.BizTalk.Pipeline.dll file that is included in this hotfix replaces the Microsoft.BizTalk.Pipeline.dll file from the hotfix that is mentioned in the following Microsoft Knowledge Base article:

908023 FIX: Per-instance pipeline configuration does not work as expected in BizTalk Server 2004

Hotfix implementation information
For detailed information about how to use the functionality that this hotfix provides, see the &quot;More Information&quot; section.

File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

Note Because of file dependencies, the most recent hotfix that contains these files may contain additional files.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

MORE INFORMATION
This hotfix makes a change to the parser. This change adds a new Boolean positional field annotation that is named trim_field. The trim_field field annotation lets you suppress field coercion without modifying the padding behavior of the parser.

The value of the trim_field field annotation is true if the field is not present or if the field is not located. When the value of the trim_field field annotation is false, the parser does not perform the field trimming process before the parser serializes the particular field. You must manually add the trim_field=&quot;false&quot; field annotation to the <FieldInfo> element of any field for which you want to prevent field coercion in the SWIFT Base Types.xsd schema.

When you add the trim_field=&quot;false&quot; field annotation, this annotation does not affect field padding of fixed length fields that have less than the maximum number of characters.

Note This annotation does not have a corresponding design-time user-interface option in the schema editor. You must modify this annotation directly in the schema and in the field according to your requirements.

Example
The following example illustrates how to use the functionality that this hotfix provides.

Note To use the functionality that this hotfix provides, you must identify the exact XML location of the field that you want to modify. One method to identify this XML location is to use the XML pipeline to create a send port, and then use the send port to generate the XML representation of the message. Then, locate the field in the XML representation of the message.

In the XML representation of this message, locate the field for which you want to prevent field coercion. In this example, you want to prevent field coercion on the following field of all MT543 messages:

SequenceE1, Party_E1_95P, BankIdentifierCode, BranchCode

To prevent field coercion of this field, follow these steps: <ol> Open the MT543.xsd file, and then search for SequenceE1.</li> From the SequenceE1 location, search for Party_E1_95P.</li> From the Party_E1_95P location, search for BankIdentifierCode.</li> From the BankIdentifierCode location, search for BranchCode. This item is not found.</li>  Because the search results do not return BranchCode, return to the BankIdentifierCode line and note its type. In this example, the line has the following type: type=&quot;ns0:bankidentifiercodeType&quot; </li>  Open the project's SWIFT Base Types.xsd file, and then search for bankidentifiercodeType.

Note This item appears two times in the file. However, you want to locate the complex type definition that is returned. In this example, you want to locate the section that starts with the following entry: <xs:complexType name=&quot;bankidentifiercodeType&quot;> </li> In this complex type, locate the <BranchCode> element. Then, locate the <FieldInfo> element.</li>  Add the trim_field=&quot;false&quot; annotation to this section. In this example, the section appears as follows: <b:fieldInfo justification=&quot;left&quot; pos_length=&quot;3&quot; pos_offset=&quot;0&quot; notes=&quot;Branch Code&quot; sequence_number=&quot;4&quot; pad_char_type=&quot;none&quot; trim_field=&quot;false&quot; /> </li> Save the changes to the project, rebuild the project, and then redeploy the project.</li> Restart all BizTalk Server 2004 services.</li></ol>

After you follow these steps, the message generates a SWIFT error as expected when you submit an MT543 message that contains too many characters in the BranchCode field. However, when you send the message through the Flat File Assembler pipeline, the Flat File Serializer component does not truncate the contents of the BranchCode field.

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Additional query words: BTS2004 FFASM FlatFile serialization XML coercion A4SWIFT field truncation

Keywords: kbbug kbfix kbqfe kbpubtypekc kbbiztalk2004presp2fix kbhotfixserver KB923531

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.