08-03-04 07:47 AM
Hi,
This is because in the second construction shape, the message is constructed
again (e.g. it looses the data that was set in the first construction shape
. If you then try to set one of the fields, you will be attemting to access
an unconstructed message.
One option is to perform both the operations in the same construction shape,
as you will then perform the transform to assign the message values, then m
odify them.
Another option is to decalre another message (e.g. msgB), and use the second
sonstruction shape to construct it, and assign it like this:
msgB = msgA;
msgB.Field = someValue;
Regards,
Alan
--
BizTalk & .net
Consulting Training Mentoring
Stockholm London Europe
See aboutme for contact info
"Marcus" wrote:
> I am confused about the visibility and the lifecycle of messages defined i
n an orchestration.
> I have a message (let’s call it msgA) of a complex type (C# data class expressed
as XML document) that is to be passed to a Web service. Message is constructed in a
construction shape using a transformation. In the very next step, in another constr
uct
ion shape (created as intermediate step for debugging reasons) I am trying t
o set one of the fields of this message to a value acquired from another Web
service invoked before the first construction shape. Compiler complains tha
t “’msgA.messagePart’
: message part has not been initialized in construct statement”. How is that possible if t
he message was constructed in the previous construct shape through a transformation?
>
> I am not getting this error if assignment is done in the same construction
block with the transformation. I appreciate that somebody puts some light o
n this case.
>
> Thanks.
>
[ Post a follow-up to this message ]
|