Need to access MSMQ Context properties within an Orchestation

Home Page Forums BizTalk 2004 – BizTalk 2010 Need to access MSMQ Context properties within an Orchestation

Viewing 1 reply thread
  • Author
    Posts
    • #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

       

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

       

      • #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

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

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.