Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Need to access MSMQ Context properties within an Orchestation
- This topic has 3 replies, 1 voice, and was last updated 9 years, 8 months ago by
community-content.
-
AuthorPosts
-
-
May 26, 2008 at 2:35 AM #19740
Hi,
I am currently writing a web service in which i receive a XML message and push the message into the MSMQ. I set the MSMQ label property to the response of the web service. I want to form a BizTalk application which reads through this MSMQ and i need to log in the Response details of the web service in a database. I thought as MSMQ.Label is a context property i shall extract the message within the Orchestration and use the details. But i do not know how do i extract this context property. Or should i do the activity of extraction within the receive pipeline component. The solution is generic, so my message type is supposed to XML Document.
Please do provide ideas.
Web service —> MSMQ (Write the Response into MSMQ Lable) —>
———- BizTalk —-> Application (which makes use of the message)
—–> Another application that does the Response Logging (Correlation purposes).
Thanks
BizTalk Newbie
-
May 26, 2008 at 4:12 AM #19741
To access message context properties within an orchestration the syntax is:
myVariable = MSMQMessage(MSMQ.Label);
myVariable is an orchestration variable of type System.String and MSMQMessage is the input message received from the MSMQ queue.
-
May 27, 2008 at 5:17 AM #19760
Hi Greg,
Thanks for the reply. I am facing another challenge where i need some advice. I have a MSMQ Receive location and an Orchestration bounded to this and this orchestration pushes the message to Message Box DB. One thing i have observed that at my receive location i get the message in the format <string><InputXML/></string> and not <InputXML/> as I assumed. And i need to have orchestrations subcribing to InputXML1, InputXML2 instead of <string>Content</string>.
Does MSMQ default write the message into the <string> tag because when i observe the message in MSMQ i find only the XML, but when i check in BizTalk there is a difference.
I am in a fix.
Thanks
Ankit
-
May 27, 2008 at 3:23 PM #19773
This is caused by the BodyType property on the MSMQ message. If you send a string, then Biztalk will wrap the message in <string> tags. You could try sending an XmlDocument object.
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.