RE: URGENT!!! HELP: Custom send pipeline woes!
From: David Downing [MSFT] (ddowning_at_online.microsoft.com)
Date: 01/12/05
- Next message: Richard Blewett [DevelopMentor]: "Re: Biztalk orch. & Remoting Error"
- Previous message: jeremy: "RE: Cumulative Concatenate functoid"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 12 Jan 2005 15:38:05 GMT
It's possible you need to rewind the memory stream back to the beginning
using seek.
Dave
--------------------
>>Reply-To: "paul" <boloh77@hotmail.com>
>>From: "paul" <boloh77@hotmail.com>
>>Subject: URGENT!!! HELP: Custom send pipeline woes!
>>Date: Fri, 7 Jan 2005 16:43:06 -0500
>>Lines: 61
>>X-Priority: 3
>>X-MSMail-Priority: Normal
>>X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
>>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
>>X-RFC2646: Format=Flowed; Original
>>Message-ID: <u#AbgHQ9EHA.3828@TK2MSFTNGP09.phx.gbl>
>>Newsgroups: microsoft.public.biztalk.general
>>NNTP-Posting-Host: 66.241.131.34
>>Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09
phx.gbl
>>Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.general:23357
>>X-Tomcat-NG: microsoft.public.biztalk.general
>>
>>Here's my super simple xml schema:
>><ns0:CARequest xmlns:ns0=http://SyndicateHubSchema.CARequest">
>> <Status>Success</Status>
>></ns0:CARequest>"
>>
>>
>>And here 's my code in the Execute method:
>>SeekableReadOnlyStream stream = new
>>SeekableReadOnlyStream(pInMsg.BodyPart.GetOriginalDataStream());
>>
>> // Load the message stream (the body part) into an XmlDocument
>> XmlDocument xmlBody = new XmlDocument();
>> xmlBody.PreserveWhitespace = true;
>> xmlBody.Load(stream);
>> XmlElement bodyRoot = xmlBody.DocumentElement;
>> XmlNodeList eList = bodyRoot.GetElementsByTagName("Status");
>> XmlNode statusNode = eList.Item(0);
>> statusNode.InnerXml = "Hello World";
>>
>> System.Text.UTF8Encoding encoding=new System.Text.UTF8Encoding();
>>
>> MemoryStream ms = new
MemoryStream(encoding.GetBytes(xmlBody.OuterXml));
>>
>> // Create new message body part
>> IBaseMessagePart newBodyPart =
>>pContext.GetMessageFactory().CreateMessagePart();
>>
>> // Copy body part properties by references.
>> newBodyPart.PartProperties = pInMsg.BodyPart.PartProperties;
>>
>> // Set virtual stream as a data stream for the new message body part
>> newBodyPart.Data = ms;
>>
>>
>>
>>
>>I keep getting the following error:
>>There was a failure executing the send pipeline: "MyTest.SendPipeline1"
>>Source: "System.Xml" Send Port:
>>"http://BIZTALKVPC/BTSHTTPRECEIVE/BTSHttpReceive.dll" Reason: The root
>>element is missing.
>>
>>Uncaught exception terminated service
>>SyndicateHub.SyndicateOrch(3a1c6056-2c00-359e-5e97-7233f652f1cd),
instance
>>913b6038-d0f0-41a9-a30e-9a51071c63db
>>
>>An error occurred while processing the message, refer to the details
section
>>for more information
>>
>>Exception type: XlangSoapException
>>Source: Microsoft.XLANGs.BizTalk.Engine
>>Target Site: Void VerifyTransport(Microsoft.XLANGs.Core.Envelope, Int32,
>>Microsoft.XLANGs.Core.Context)
>>
>>
>>
>>
>>I've been on stuck on this for a while... can someone tell me why I'm
>>getting this 'root element' missing error????
>>
>>
>>
This posting is provided "AS IS" with no warranties, and confers no rights.
EBusiness Server Team
- Next message: Richard Blewett [DevelopMentor]: "Re: Biztalk orch. & Remoting Error"
- Previous message: jeremy: "RE: Cumulative Concatenate functoid"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|