Constructing general xml document in orchestration
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > Constructing general xml document in orchestration




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Constructing general xml document in orchestration  
Bill


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-14-05 10:49 PM

Hi,

I am trying to build a orchestration that receives an xml document, where
one node contains antoher encoded xml document (which i know little about).
I would like to decode the node and create an xml document, which is sent
out of BizTalk.
I have built an orchestration that receives the document (and I have a
schema for it) the message is passed on to a construct message shape
containing a message assignment shape with the following code:

encoding = new System.Text.UTF8Encoding();
signedMessage = new System.Xml.XmlDocument();
encodedMessage = UUEnvelope;
signedMessage.LoadXml(encoding.GetString(System.Convert.FromBase64String(enc
odedMessage.LastChild.LastChild.InnerXml)));
System.Diagnostics.Debug.WriteLine("signed message
loaded!\n"+signedMessage.OuterXml);
XMLdoc = signedMessage;
System.Diagnostics.Debug.WriteLine("signed message assigend to XMLdoc");

This does not work (surprise!). When the execution reaches the message
assignment shape I get this error message:

Uncaught exception terminated service
myProject.SendDirect(c9d6b52d-42c6-9292-d710-6686eb531757), instance
10ebaf7d-50aa-42a4-96f6-15a78f1b2f12

The root element is missing.

Exception type: XmlException
Source: System.Xml
Target Site: Boolean Read()
Help Link:
Additional error information:

The message type for message XMLdoc is System.Xml.XmlDocument. The output of
the construct message is passed on to a send shape the sends the message to 
a
post of type file. The pipeline is
'Microsoft.BizTalk.DefaultPipelines.PassThruTransmit' so no validation as I
do not have any thing to validate against.

Can some one pls point out the error. Is it not possible to specify that
something is a xml document (and nothing further) and then route it through
BizTalk.

Best regards,

Bill






[ Post a follow-up to this message ]



    RE: Constructing general xml document in orchestration  
Ruslan Yakushev [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-15-05 01:46 AM

I think orchestration language does not allow this type of assingments:

XMLdoc = signedMessage; // where the signedMessage is of type XmlDocument

What you can do instead is to create a serializable .NET class with one
method that takes as an input an XLANGMessage object and then writes the
XML data into it. Something like this:

public XLANGMessage SaveXmlToXLANGMessage(XLANGMessage msg)
{
XMLDocument xmlDoc = new XmlDocument();

// Initialize your Xml document here and set its content.

XLANGPart p = msg[0];
p.LoadFrom(xmlDoc);

return msg;
}

Then invoke this method from the message assignment shape:

XMLdoc = MyClass.SaveXmlToXLANGMessage(receivedMessage);

--------------------
>Thread-Topic: Constructing general xml document in orchestration
>thread-index: AcT6SvwCDGY/Yz6SRPK+m/S1++/AKA==
>X-WBNR-Posting-Host: 194.192.21.238
>From: "examnotes" <Bill@discussions.microsoft.com>
>Subject: Constructing general xml document in orchestration
>Date: Fri, 14 Jan 2005 07:09:03 -0800
>Lines: 48
>Message-ID: <EEA058C8-B150-416C-9B40-9A0BD271C83A@microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
>	charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.biztalk.orchestration
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA0
3.phx.gbl
>Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.orchestration:9778
>X-Tomcat-NG: microsoft.public.biztalk.orchestration
>
>Hi,
>
>I am trying to build a orchestration that receives an xml document, where
>one node contains antoher encoded xml document (which i know little about).
>I would like to decode the node and create an xml document, which is sent
>out of BizTalk.
>I have built an orchestration that receives the document (and I have a
>schema for it) the message is passed on to a construct message shape
>containing a message assignment shape with the following code:
>
>encoding = new System.Text.UTF8Encoding();
>signedMessage = new System.Xml.XmlDocument();
>encodedMessage = UUEnvelope;
signedMessage.LoadXml(encoding.GetString(System.Convert.FromBase64String(enc
odedMessage.LastChild.LastChild.InnerXml)));
>System.Diagnostics.Debug.WriteLine("signed message
>loaded!\n"+signedMessage.OuterXml);
>XMLdoc = signedMessage;
>System.Diagnostics.Debug.WriteLine("signed message assigend to XMLdoc");
>
>This does not work (surprise!). When the execution reaches the message
>assignment shape I get this error message:
>
>Uncaught exception terminated service
>myProject.SendDirect(c9d6b52d-42c6-9292-d710-6686eb531757), instance
>10ebaf7d-50aa-42a4-96f6-15a78f1b2f12
>
>The root element is missing.
>
>Exception type: XmlException
>Source: System.Xml
>Target Site: Boolean Read()
>Help Link:
>Additional error information:
>
>The message type for message XMLdoc is System.Xml.XmlDocument. The output
of
>the construct message is passed on to a send shape the sends the message
to a
>post of type file. The pipeline is
>'Microsoft.BizTalk.DefaultPipelines.PassThruTransmit' so no validation as
I
>do not have any thing to validate against.
>
>Can some one pls point out the error. Is it not possible to specify that
>something is a xml document (and nothing further) and then route it
through
>BizTalk.
>
>Best regards,
>
>Bill
>
>

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note:  For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:27 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register