Click to Rate and Give Feedback
MSDN
MSDN Library
BizTalk Server
Development
 Handling Incoming Data Streams in P...
Collapse All/Expand All Collapse All
Handling Incoming Data Streams in Pipeline Components

The following considerations should be made when writing custom disassembler code for pipeline components in BizTalk Server 2006.

When you write custom disassembler code for pipeline components in BizTalk Server 2006, ensure that you do not close the incoming data stream in the disassembler code. The incoming stream from the input message is a shared resource. The incoming stream is also used by the message body tracking component in the BizTalk Server 2006 message engine.

If you either implicitly or explicitly close the incoming stream, tracking data may be lost and you will be unable to examine the stream data in the Health and Activity Tracking (HAT) tool in BizTalk Server 2006.

Ensure that you read from the incoming data stream until the end of the stream is reached. For example, if custom code makes a read request for 300 KB of data and the code only receives 34 KB of data, do not assume that the end of the stream has been reached. The custom code should always read from the incoming stream until 0 bytes is returned.

Before returning the data stream in the custom component logic, set the data stream pointer back to the start of the stream. For example, this code illustrates logic to use the seek method to point to the beginning of the stream before returning the stream:

myDataStream.Seek(0, SeekOrigin.Begin);
return myDataStream;

If you do not do this and the stream is read to the end in the current component, the next component receives what appears to be an empty stream because the data stream pointer was not set to the start of the stream. This can cause unexpected parsing and validation errors in subsequent pipeline components.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker