BizTalk 2004 :: messages mutating when they shouldnt be
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 General > BizTalk 2004 :: messages mutating when they shouldnt be




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

    BizTalk 2004 :: messages mutating when they shouldnt be  
BA


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


 
04-27-06 12:26 PM


Hello all,

I have a BAZZAR one:

I have a message coming into an orchestration (M1) which is copied to a new
message name (M2) and then is passed to a C# component where it is being
modified and returned back to the orchestration.

For some reason I cant understand the messages are all being mutated once
the component is callled.  M1 should never be modified but it equals the
value of M2 once the component is called.  This is very frustrating since
I need the unmodified M1 later in the orchestration.  Even if I set M1 =
M3 for example, M3 is ALSO mutated to the value of M2 !!!!!

I have tried 100 different message combination and nothing changes this beha
vior.

The component is called in a message assignment shape like this:

.....
M2 = M1
M2 = Stater.Isvcs.Iface.MO.OFKA.Reporting.Support.addEnrich.ReturnOkResponse
(M2);

//Check the value of M1
xDoc = M1;
System.Diagnostics.Debug.WriteLine("M1 = " + xDoc.OuterXml);
....

Even if I set M1 to an xml doc variable and then set M2 to that variable
its being mutated.

Help !!

BA
http://biztalkia.blogspot.com/








[ Post a follow-up to this message ]



    Re: BizTalk 2004 :: messages mutating when they shouldnt be  
Jan Eliasen


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


 
04-27-06 12:26 PM

On Wed, 26 Apr 2006 11:53:46 +0000 (UTC), BA
<biztalk.architect@gmail.com> wrote:

>Even if I set M1 to an xml doc variable and then set M2 to that variable
>its being mutated.
It is all related to how objectoriented languages work. As long as you
are only changing the pointers, you are not actually creating a new
object. Try this:

xmldocVariable1 = M1;
xmldocVariable2 = new System.Xml.XmlDocument();
xmldocVariable2.loadXml(xmldocVariable1.OuterXml);
M2 = M1;
M1 = xmldocVariable2;
M2 =
Stater.Isvcs.Iface.MO.OFKA.Reporting.Support.addEnrich.ReturnOkResponse(M2);

--
Eliasen Jr. representing himself and not the company he works for.

Private email: jan@eliasen.dk

"Ford," he said, "you're turning into a penguin. Stop it."





[ Post a follow-up to this message ]



    Re: BizTalk 2004 :: messages mutating when they shouldnt be  
BA


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


 
04-27-06 06:21 PM

Thanks for the reply, Jan.

Makes a bit more sense although I wonder why there is so much information
about the immutability of messages.

BA

> On Wed, 26 Apr 2006 11:53:46 +0000 (UTC), BA
> <biztalk.architect@gmail.com> wrote: 
> It is all related to how objectoriented languages work. As long as you
> are only changing the pointers, you are not actually creating a new
> object. Try this:
>
> xmldocVariable1 = M1;
> xmldocVariable2 = new System.Xml.XmlDocument();
> xmldocVariable2.loadXml(xmldocVariable1.OuterXml);
> M2 = M1;
> M1 = xmldocVariable2;
> M2 =
> Stater.Isvcs.Iface.MO.OFKA.Reporting.Support.addEnrich.ReturnOkRespons
> e(M2);
> Private email: jan@eliasen.dk
>
> "Ford," he said, "you're turning into a penguin. Stop it."
>







[ Post a follow-up to this message ]



    Re: BizTalk 2004 :: messages mutating when they shouldnt be  
Jan Eliasen


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


 
04-28-06 12:16 PM

On Thu, 27 Apr 2006 14:32:57 +0000 (UTC), BA
<biztalk.architect@gmail.com> wrote:

>Thanks for the reply, Jan.
No problem

>Makes a bit more sense although I wonder why there is so much information
>about the immutability of messages.
True - a bit weird since they can actually be changed a number of
places...

--
Eliasen Jr. representing himself and not the company he works for.

Private email: jan@eliasen.dk

"Ford," he said, "you're turning into a penguin. Stop it."





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:56 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