Question

I am polling a well formatted xml messages from SQL Server table using sqlserver stored procedure that returnes me xml like the following one

<PolledMessage xmlns="http://SomeNamespace.ru/">
  <Message>
    <MessageNode>
      <MasterDataMemberAddRequest xmlns="http://AnotherNamespace">
        ...
      </MasterDataMemberAddRequest>
    </MessageNode>
  </Message>
  <Message>
    <MessageNode>
      <MasterDataMemberAddRequest xmlns="http://AnotherNamespace">
        ...
      </MasterDataMemberAddRequest>
    </MessageNode>
  </Message>
</PolledMessage>

Where the MessageNode is a node, containing the message that i want to extract. I have done that using Envelope schema with XmlReceive pipeline, and it worked well. But after that i need to write some custom values to the message context of each of that extracted messages. i've wrote a custom pipeline, that takes property name, namespace and value and writes it to the message context, but i can't figure out how to put together that disassembling and promoting properties of disassembled messages.

Thanks for any advice!

Was it helpful?

Solution

Arsen,

The XMLReceive pipeline debatches your envelope using the XML dissembler component, and will promote individual message properties providing they are correctly marked as context properties (and assuming they are in the message!)

If you need to push custom non-message properties into each message, you could create a custom pipeline and place your pipeline component that acts on each disassembled message in the resolve party stage.

enter image description here

Here's a link to a custom context property promotion component. You'll see in the example that it is placed in the validate stage - I believe validate or resolve party are both ok. Hope this helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top