Last try: Multiple messages, same root node.

Home Page Forums BizTalk 2004 – BizTalk 2010 Last try: Multiple messages, same root node.

Viewing 1 reply thread
  • Author
    Posts
    • #17726

      I've tried going down this road before and I'm still not satisfied with my current workaround, so now I'm looking to do it 'right'.

      An application published multiple messages with the same root node, different data structure in the guts of the message.  The output messages come out like so:

      <ProjectInfo>
        <Details Name="Subject" Value="ProjectMain" />
        <Details Name="ProjectID" Value="1" />
        <Details Name="ProjectName" Value="MyProject" />
        <Details Name="ProjectStart" Value="02/19/2007" />
      </ProjectInfo>

      <ProjectInfo>
        <Details Name="Subject" Value="ProjectResource" />
        <Details Name="ProjectID" Value="1" />
        <Details Name="FirstName" Value="Mickey" />
        <Details Name="LastName" Value="Mouse" />
      </ProjectInfo>

      This is the first issue, I have schemas in place within a project that match a converted version of the messages based on a transformation I use to change the messages from a name/value pair, to element based messages:

      <ProjectInfo>
        <Subject>ProjectMain</Subject>
        <ProjectID>1</ProjectID>
        <ProjectName>MyProject</ProjectName>
        <ProjectStart>02/19/2007</ProjectStart>
      </ProjectInfo>

      <ProjectInfo>
        <Subject>ProjectResource</Subject>
        <ProjectID>1</ProjectID>
        <FirstName>Mickey</FirstName>
        <LastName>Mouse</LastName>
      </ProjectInfo>

      I built a custom pipeline component that changes the MessageType property to be set as the "<Subject>" value and was hoping to simply use this as the filter on my subscriptions. Since all of my schemas have the same root node in order to match the incoming messages, anytime I receive a message, I get the wonderful "Error in accessing the part data or one of its fragments. The part or fragment may not exist in the database." message thanks to the duped schemas that are deployed.

      I had thought of changing the root node in the pipeline component in order to make this work, but I also have other subscribers that require the original message to be sent out to them as well so I couldn't go this route.  I would really like to somehow get around this as I'd rather use Maps in my solutions rather than using non-typed messages and XPATH for everything as I have to now.  I'm pretty sure I'm close, but I'm either missing something…or I'm shooting for the impossible.

      Help!

      -Rich

    • #17740

      Can you have the messages received by different receive locations?  If so, you can use the Schema Collection properties to set the exact message for each pipeline. 

       

      Or maybe set the pipeline to allow unrecognized messages and cast the message into the correct type (or set message type – although I think it’s read only) inside an Orchestration?

       

      Just some ideas.

       

      • #17744

        Thanks Stephen,

        I couldn't find much about this, but I ended up spending several more hours on it and messed with using a property schema on a 'dummy' field I placed in the schema that will never be populated by the source application.  Based on a value in the incoming message, I read for that value and place it in the dummy field and promote it and that seems to work the way I want it to, to a degree, but I still can't come up with any ideas on how I can make the messages unique enough to a point where I can use maps to do my transformations.  I'm using a LOT of Xpath to create the outgoing messages and I was hoping to get rid of most of it.

        Thanks!
        -Rich

         

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