06-30-05 11:00 PM
If there is no subscriber, even for the port, let alone the source or
destination meessage then there is no subscription. Thats why you can track
messages before and after pipeline.
"Al" <al_zxcvbnm@yahoo.co.uk> wrote in message
news:f896c1a6.0506280014.1fce99c3@posting.google.com...
> Hi all,
>
> I've implemented a decoder pipeline component which replace the
> original message with a new one.
> the code is:
>
> IBaseMessagePart bodyPart = inmsg.BodyPart;
>
> rootElementName = "Root";
> namespaceMessage = "http://name";
>
> MemoryStream outputStream = new MemoryStream();
>
> XmlTextWriter xmlWriter = new XmlTextWriter(outputStream,
> Encoding.UTF8);
> xmlWriter.WriteStartElement("ns0", rootElementName, namespaceMessage);
> xmlWriter.WriteStartElement("InputFileName");
> xmlWriter.WriteString("a string");
> xmlWriter.WriteEndElement();
> xmlWriter.WriteEndElement();
> xmlWriter.Flush();
>
> // rewind
> outputStream.Seek(0, SeekOrigin.Begin);
> // replace the original message
> bodyPart.Data = outputStream;
> pc.ResourceTracker.AddResource( outputStream );
> // set the MessageType
> string MessageType = namespaceMessage + "#" + rootElementName;
>
> string systemPropertiesNamespace =
> "http://schemas.microsoft.com/BizTalk/2003/system-properties";
> inmsg.Context.Promote("MessageType", systemPropertiesNamespace,
> messageType);
>
>
> All works great if there is an orchestration for the MessageType =
> namespaceMessage + "#" + rootElementName
>
> What i dont understand is the folowing situation:
> when there is no orchestration subscribed to MessageType,BTS doesn't
> know how to dispatch the Message and correctly report an error.
>
> In this case if I look in the HAT and save the message I see the
> original message and not the new one wroten in
> the pipeline component.
> I can't understand why the original message goes in the MessageBox
> and not the new one.
> Can someone explain me why this occurs?
> Thanks in advance, Al
[ Post a follow-up to this message ]
|