| 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.
>
|
|
|
|