 |
|
 |
|
|
 |
Assign a Message to an XmlDocument |
 |
 |
|
|
09-11-04 12:48 PM
Dear All:
In my orchestration, I have two variables and one message. One variable is
named xmlDoc and it's type is System.Xml.XmlDocument. Another variable is
named xmlString and it's type is String. The message is named IncomeInstance
and it's type is IncomeSchema. Now, I want to convert the IncomeInstance to
xmlString, so I use the "Expression" shape. The expression is:
xmlDoc = IncomeInstance;
xmlString = xmlDoc.OuterXml;
When I use the HAT for debugging, I set a breakpoint after the Expression
shape. After the Expression shape, I found:
1. The value of xmlDoc is null.
2. The value of xmlString is null.
But the Part Value of IncomeInstance is as expected.
I have no idea why the values of the variables are null, please help me,
tanks a lot!
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Assign a Message to an XmlDocument |
 |
 |
|
|
09-11-04 12:48 PM
Try
xmlDoc = (System.Xml.XmlDocument)IncomeInstance;
--
Kind Regards,
Nabeel Prior
"Norman Chen" <NormanChen@discussions.microsoft.com> wrote in message
news:609BD223-FBBA-4FCF-B02E-C7539D1D2905@microsoft.com...
> Dear All:
> In my orchestration, I have two variables and one message. One variable
> is
> named xmlDoc and it's type is System.Xml.XmlDocument. Another variable is
> named xmlString and it's type is String. The message is named
> IncomeInstance
> and it's type is IncomeSchema. Now, I want to convert the IncomeInstance
> to
> xmlString, so I use the "Expression" shape. The expression is:
>
> xmlDoc = IncomeInstance;
> xmlString = xmlDoc.OuterXml;
>
> When I use the HAT for debugging, I set a breakpoint after the Expression
> shape. After the Expression shape, I found:
> 1. The value of xmlDoc is null.
> 2. The value of xmlString is null.
> But the Part Value of IncomeInstance is as expected.
>
> I have no idea why the values of the variables are null, please help me,
> tanks a lot!
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Assign a Message to an XmlDocument |
 |
 |
|
|
09-11-04 10:47 PM
Hi, Nabeel Prior:
First, Thanks for your reply.
I have done, but it's no use.
"Nabeel Prior" wrote:
> Try
> xmlDoc = (System.Xml.XmlDocument)IncomeInstance;
>
> --
>
> Kind Regards,
>
> Nabeel Prior
> "Norman Chen" <NormanChen@discussions.microsoft.com> wrote in message
> news:609BD223-FBBA-4FCF-B02E-C7539D1D2905@microsoft.com...
>
>
>
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
RE: Assign a Message to an XmlDocument |
 |
 |
|
|
09-13-04 10:52 PM
Hi Norman,
What you are doing looks correct. Are you 100% sure that the IncomeInstance
message contains data? I have used this method lots of times, and not had a
problem with it. Also, you will get a null reference exception if you call
xmlDoc.OuterXml when xmlDoc is null.
Another top tip, you can also use System.Diagnostics.Debug.WriteLine
(xmlString); and attatch VisualStudio debugger to the BTSNTSvc.exe process,
to dump your XML data.
/Alan
"Norman Chen" wrote:
> Dear All:
> In my orchestration, I have two variables and one message. One variable
is
> named xmlDoc and it's type is System.Xml.XmlDocument. Another variable is
> named xmlString and it's type is String. The message is named IncomeInstan
ce
> and it's type is IncomeSchema. Now, I want to convert the IncomeInstance t
o
> xmlString, so I use the "Expression" shape. The expression is:
>
> xmlDoc = IncomeInstance;
> xmlString = xmlDoc.OuterXml;
>
> When I use the HAT for debugging, I set a breakpoint after the Expression
> shape. After the Expression shape, I found:
> 1. The value of xmlDoc is null.
> 2. The value of xmlString is null.
> But the Part Value of IncomeInstance is as expected.
>
> I have no idea why the values of the variables are null, please help me,
> tanks a lot!
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
RE: Assign a Message to an XmlDocument |
 |
 |
|
|
09-15-04 03:19 PM
Try...
xmlDoc = new System.Xml.XmlDocument();
xmlDoc = IncomeInstance;
xmlString = xmlDoc.OuterXml;
"Norman Chen" wrote:
> Dear All:
> In my orchestration, I have two variables and one message. One variable
is
> named xmlDoc and it's type is System.Xml.XmlDocument. Another variable is
> named xmlString and it's type is String. The message is named IncomeInstan
ce
> and it's type is IncomeSchema. Now, I want to convert the IncomeInstance t
o
> xmlString, so I use the "Expression" shape. The expression is:
>
> xmlDoc = IncomeInstance;
> xmlString = xmlDoc.OuterXml;
>
> When I use the HAT for debugging, I set a breakpoint after the Expression
> shape. After the Expression shape, I found:
> 1. The value of xmlDoc is null.
> 2. The value of xmlString is null.
> But the Part Value of IncomeInstance is as expected.
>
> I have no idea why the values of the variables are null, please help me,
> tanks a lot!
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
RE: Assign a Message to an XmlDocument |
 |
 |
|
|
09-16-04 01:51 AM
Dear All:
xmlDoc = IncomeInstance;
xmlString = xmlDoc.OuterXml;
It is work, but just as I said before, xmlDoc and xmlString are null in HAT.
I found this truth after dumping xmlDoc and xmlString, so I feel that I have
been cheated by HAT.
Maybe there is something wrong when I use HAT.
Thank you all for your reply, thank you!
"Norman Chen" wrote:
> Dear All:
> In my orchestration, I have two variables and one message. One variable
is
> named xmlDoc and it's type is System.Xml.XmlDocument. Another variable is
> named xmlString and it's type is String. The message is named IncomeInstan
ce
> and it's type is IncomeSchema. Now, I want to convert the IncomeInstance t
o
> xmlString, so I use the "Expression" shape. The expression is:
>
> xmlDoc = IncomeInstance;
> xmlString = xmlDoc.OuterXml;
>
> When I use the HAT for debugging, I set a breakpoint after the Expression
> shape. After the Expression shape, I found:
> 1. The value of xmlDoc is null.
> 2. The value of xmlString is null.
> But the Part Value of IncomeInstance is as expected.
>
> I have no idea why the values of the variables are null, please help me,
> tanks a lot!
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
|
Sponsored Links |
 |
 |
|
|
 |
All times are GMT. The time now is 04:14 AM. |
 |
|
|
 |
|
 |
|
|
 |
|
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
|
 |
|
 |
|