BizTalk Server Orchestration - Message Assigning Problem

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > November 2005 > Message Assigning Problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Message Assigning Problem
Samuel L

2005-11-11, 7:48 am

Hi!

I receive a message A of schema type named Order in my orchestration. Then I
want to construct a message B of XmlDocument type. But simply assigning B=A
in a construct shape results in error... "Object reference not set to an
instance of an object."

I am able to perform my assignment if I add a temporary XmlDocument variable
Tmp and do like this: Tmp=A; B=Tmp;

Why does this work while the first straigh-forward approach does not work??

Thanks for your comments!

Yoss Dahan

2005-11-11, 5:58 pm

Samuel L wrote:
> Hi!
>
> I receive a message A of schema type named Order in my orchestration. Then I
> want to construct a message B of XmlDocument type. But simply assigning B=A
> in a construct shape results in error... "Object reference not set to an
> instance of an object."
>
> I am able to perform my assignment if I add a temporary XmlDocument variable
> Tmp and do like this: Tmp=A; B=Tmp;
>
> Why does this work while the first straigh-forward approach does not work??
>
> Thanks for your comments!
>

I believe this is because when you create a variable an instance of it
is created for you (b calling the default constructor, unless otherwise
specified.

I have not tried that just now, but did you try actually calling the
XmlDocument constructor before assigning your message to the XmlDocument
type'd message?

try
B = new XmlDocument();
B=A;

Hope this works for yo

Yossi Dahan
Sabra Ltd.
Samuel L

2005-11-14, 5:53 pm

Thanks Yoss!

I seemed to work it out... Actually this wasn't the problem! =)
I had some other errors acting as trouble makers!

"Yoss Dahan" wrote:

> Samuel L wrote:
> I believe this is because when you create a variable an instance of it
> is created for you (b calling the default constructor, unless otherwise
> specified.
>
> I have not tried that just now, but did you try actually calling the
> XmlDocument constructor before assigning your message to the XmlDocument
> type'd message?
>
> try
> B = new XmlDocument();
> B=A;
>
> Hope this works for yo
>
> Yossi Dahan
> Sabra Ltd.
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com