|
Home > Archive > BizTalk Server Orchestration > September 2004 > How do get the input Message in Assign shape?
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 |
How do get the input Message in Assign shape?
|
|
| Ben Jiang 2004-09-26, 8:49 pm |
| Can someone help me how do I get the input xml document
in an construct shape? I need to pass whole xml document
from receive port as a parameter to my dot net Method:
Sub DoSomething(byval inputXmldocument as System.XML.XmlDocument)
'Manipulate inputXmldocument here...
End Sub
| |
| Alan Smith 2004-09-27, 2:47 am |
| Hi Ben,
You can pass a BizTalk message as an XML document, one thing you can't do is
change a message, they are imutable (correct?).
I usually do soemthing like this:
NewMessage = MyClass.DoSomehting (OldMessage);
Where MyClass has a static (shared in VB) method to manipulate the XML:
e.g.
public static XmlDocument DoSomething (XmlDocument inDoc)
The construct shape will construc a new message instance (NewMessage).
Hope this helps.
/Alan
"Ben Jiang" wrote:
> Can someone help me how do I get the input xml document
> in an construct shape? I need to pass whole xml document
> from receive port as a parameter to my dot net Method:
>
> Sub DoSomething(byval inputXmldocument as System.XML.XmlDocument)
> 'Manipulate inputXmldocument here...
>
> End Sub
| |
| Ben Jiang 2004-09-27, 2:47 am |
| Thank Alan,
I did exactly as yours. but I always get error message when compiling:
"use of unconstructed message <inputMessage>" - where <inputMessage> is the
message from Receive port.(same as your OldMessage).
Any idea?
I have two messages:
InputMessage(based on receive Schema) and OutputMessage(based on
Send Schema);
In my construct or assign shapes, I do
OutputMessage = mydotnet.dosomething(InputMessage);
Where mydotnet.dosomething is my dot net method takes xmldocument
and return xmldocument object.
I read through all threads in newsgroup, i could not find any body answner
the question. A lot of
threads just confuse people.
cheers
Ben
"Alan Smith" wrote:
[vbcol=seagreen]
> Hi Ben,
>
> You can pass a BizTalk message as an XML document, one thing you can't do is
> change a message, they are imutable (correct?).
>
> I usually do soemthing like this:
>
> NewMessage = MyClass.DoSomehting (OldMessage);
>
> Where MyClass has a static (shared in VB) method to manipulate the XML:
>
> e.g.
> public static XmlDocument DoSomething (XmlDocument inDoc)
>
> The construct shape will construc a new message instance (NewMessage).
>
> Hope this helps.
>
> /Alan
>
> "Ben Jiang" wrote:
>
| |
| Alan Smith 2004-09-27, 5:51 pm |
| Hi Ben,
Check that your construct shape is set to construct the message you are
assigning to (NewMessage in my example), you need to use two messages in this
example, the one you receive (OldMessage), and the one you construct
(NewMessage).
/Alan
"Ben Jiang" wrote:
[vbcol=seagreen]
> Thank Alan,
> I did exactly as yours. but I always get error message when compiling:
> "use of unconstructed message <inputMessage>" - where <inputMessage> is the
> message from Receive port.(same as your OldMessage).
> Any idea?
>
> I have two messages:
> InputMessage(based on receive Schema) and OutputMessage(based on
> Send Schema);
> In my construct or assign shapes, I do
> OutputMessage = mydotnet.dosomething(InputMessage);
>
> Where mydotnet.dosomething is my dot net method takes xmldocument
> and return xmldocument object.
>
> I read through all threads in newsgroup, i could not find any body answner
> the question. A lot of
> threads just confuse people.
>
> cheers
> Ben
>
> "Alan Smith" wrote:
>
| |
| Ben Jiang 2004-09-27, 8:46 pm |
| Thanks Alen.
After I only specify the OutMessage as constructed message, it works!
(Previously I checked both for Inmessage and Outmessage in the dropdown list
of Messages Constructed property of Construct Message shape).
Thanks you for your kindly help.
Cheers
Ben
"Alan Smith" wrote:
[vbcol=seagreen]
> Hi Ben,
>
> Check that your construct shape is set to construct the message you are
> assigning to (NewMessage in my example), you need to use two messages in this
> example, the one you receive (OldMessage), and the one you construct
> (NewMessage).
>
> /Alan
>
> "Ben Jiang" wrote:
>
|
|
|
|
|