You receive an error message when you send a byte array to a Message Queuing receive function by using the ActiveXMessageFormatter object in BizTalk Server 2002 (839064)
The information in this article applies to:
- Microsoft BizTalk Server 2002
SYMPTOMSIn Microsoft BizTalk Server 2002, if you use the ActiveXMessageFormatter object to send a byte array to a Microsoft Message Queuing (also
known as MSMQ) receive function, an error message that is similar to the
following appears in the BizTalk Server application log: Event ID: 324 Source: BizTalk Server Category: Document
Processing Description: An error occurred in BizTalk Server. Details:
------------------------------ The ""Direct=OS:Server
Name\private$\TestQ"" Message Queuing receive function is not
configured for a pass-through submission, but it has encountered a
document that was submitted previously as a pass-through submission.
Change this receive function to accept pass-through submissions or remove
the pass-through document from the queue. This receive function will be
shut down.
The receive function "TestQ" has experienced problems, it
will be shut down and disabled. Once these problems have been corrected,
re-enable this receive function in BizTalk Server Administration.
There was a failure processing the "TestQ" receive function.
Check your receive function configuration in BizTalk Server
Administration. Note In this error message, Server Name is
a placeholder for the name of your computer that is running BizTalk
Server. CAUSEWhen the Send method of a MessageQueue object is called, the body is serialized by using the formatter
that the Formatter property of the MessageQueue instance specifies. By default, the ActiveXMessageFormatter object sets the BodyType property to VT_VECTOR | VT_UI1.
However, a Message Queuing receive function cannot
process a message that has a BodyType property that is set to VT_VECTOR | VT_UI1. If a Message Queuing receive function tries to process the
message, BizTalk Server generates the error message that appears in the
"Symptoms" section.RESOLUTIONSample codeThe following sample code illustrates how to set the correct BodyStream property and the correct BodyType property for a Message instance before you send
the message to a Message Queuing queue that a Message Queuing receive function
is monitoring. Microsoft provides programming examples for illustration only,
without warranty either expressed or implied. This includes, but is not limited
to, the implied warranties of merchantability or fitness for a particular
purpose. This article assumes that you are familiar with the programming
language that is being demonstrated and with the tools that are used to create
and to debug procedures. Microsoft support engineers can help explain the
functionality of a particular procedure, but they will not modify these
examples to provide added functionality or construct procedures to meet your
specific requirements.
using System;
using System.Messaging;
using System.Runtime.InteropServices;
class Class1
{
[STAThread]
static void Main(string[] args)
{
byte[] bytArray = new byte[] {72, 0, 101, 0, 108, 0, 108, 0, 111, 0}; //Hello
MessageQueue mq = new MessageQueue("FormatName:DIRECT=OS:.\\private$\\TestQ");
System.Messaging.Message msg = new System.Messaging.Message();
msg.BodyStream.Write(bytArray,0, bytArray.Length);
msg.BodyType = (int) (VarEnum.VT_ARRAY | VarEnum.VT_UI1);
msg.AppSpecific = -1;
mq.Send(msg, MessageQueueTransactionType.Single);
}
}
STATUS This
behavior is by design.
| Modification Type: | Major | Last Reviewed: | 9/1/2006 |
|---|
| Keywords: | kbprb KB839064 kbAudDeveloper |
|---|
|