Debatching using custom XSLT

Hi Guys,

I need to debatch a input through a custom XSLT. Please help

Batch Input: 
<ns0:Input xmlns:ns0="http://Debatching.Input">
  <Head>Parent</Head>
  <Child>
    <Name>Name_1</Name>
    <Gender>Female</Gender>
  </Child>
  <Child>
    <Name>Name_2</Name>
    <Gender>Male</Gender>
  </Child>
</ns0:Input>

Expected Outputs: Count=2
Output 1:

<ns0:Output xmlns:ns0="http://Debatching.Output">
<Guardian>Parent</Guardian>
<FullName>Name_1</FullName>
<Sex>Female</Sex>
</ns0:Output>

Output 2:

<ns0:Output xmlns:ns0="http://Debatching.Output">
<Guardian>Parent</Guardian>
<FullName>Name_2</FullName>
<Sex>Male</Sex>
</ns0:Output>

Input Schema

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://Debatching.Input" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Debatching.Input" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Input">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="1" maxOccurs="1" name="Head" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="unbounded" name="Child">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" />
              <xs:element minOccurs="0" maxOccurs="1" name="Gender" type="xs:string" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

Output Schema

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://Debatching.Output" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Debatching.Output" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Output">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Guardian" type="xs:string" />
        <xs:element name="FullName" type="xs:string" />
        <xs:element name="Sex" type="xs:string" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
August 31st, 2015 10:44am

Hi Aman!

Where are you de-batching this message? In a pipeline component? or in an orchestration?

If its a pipeline, then you can use default XmlDisassembler to do the job by tweaking your schemas (input schema as envelop and output schema as body schema).

Regards

Abhipal Singh

  • Marked as answer by Aman Wadhwa 15 hours 33 minutes ago
  • Unmarked as answer by Aman Wadhwa 1 hour 53 minutes ago
Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 10:53am

It needs to be done via custom xslt of a BizTalk map.
August 31st, 2015 11:01am

I don't think a map will be able to output multiple messages.

Check a duplicate thread below answered by Rohit:

https://social.msdn.microsoft.com/Forums/en-US/f4694969-2833-4b8b-8544-27559612d3e9/splitting-message-using-custom-xslt-code-in-biztalk-map?forum=biztalkgeneral

You can de-batch your message by:

  1. Using a custom or default pipeline.
  2. By calling that pipeline from orchestration.
  3. By using XPath to iterate through records provided my map.
  4. By using a custom component.


Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 11:22am

Hi Aman!

Where are you de-batching this message? In a pipeline component? or in an orchestration?

If its a pipeline, then you can use default XmlDisassembler to do the job by tweaking your schemas (input schema as envelop and output schema as body schema).

Regards

Abhipal Singh

  • Marked as answer by Aman Wadhwa Monday, August 31, 2015 3:32 PM
  • Unmarked as answer by Aman Wadhwa Tuesday, September 01, 2015 5:12 AM
August 31st, 2015 2:52pm

Hi Aman!

Where are you de-batching this message? In a pipeline component? or in an orchestration?

If its a pipeline, then you can use default XmlDisassembler to do the job by tweaking your schemas (input schema as envelop and output schema as body schema).

Regards

Abhipal Singh

  • Marked as answer by Aman Wadhwa Monday, August 31, 2015 3:32 PM
  • Unmarked as answer by Aman Wadhwa Tuesday, September 01, 2015 5:12 AM
Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 2:52pm

I don't think a map will be able to output multiple messages.

Check a duplicate thread below answered by Rohit:

https://social.msdn.microsoft.com/Forums/en-US/f4694969-2833-4b8b-8544-27559612d3e9/splitting-message-using-custom-xslt-code-in-biztalk-map?forum=biztalkgeneral

You can de-batch your message by:

  1. Using a custom or default pipeline.
  2. By calling that pipeline from orchestration.
  3. By using XPath to iterate through records provided my map.
  4. By using a custom component.


  • Edited by Abhipal Singh Monday, August 31, 2015 3:31 PM fixed formatting
  • Proposed as answer by Abhipal Singh Monday, August 31, 2015 3:31 PM
  • Marked as answer by Aman Wadhwa Tuesday, September 01, 2015 5:12 AM
August 31st, 2015 3:20pm

I don't think a map will be able to output multiple messages.

Check a duplicate thread below answered by Rohit:

https://social.msdn.microsoft.com/Forums/en-US/f4694969-2833-4b8b-8544-27559612d3e9/splitting-message-using-custom-xslt-code-in-biztalk-map?forum=biztalkgeneral

You can de-batch your message by:

  1. Using a custom or default pipeline.
  2. By calling that pipeline from orchestration.
  3. By using XPath to iterate through records provided my map.
  4. By using a custom component.


  • Edited by Abhipal Singh Monday, August 31, 2015 3:31 PM fixed formatting
  • Proposed as answer by Abhipal Singh Monday, August 31, 2015 3:31 PM
  • Marked as answer by Aman Wadhwa Tuesday, September 01, 2015 5:12 AM
Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 3:20pm

Thanks Abhipal,

Yes the following options available are as follows:

  • Envelope Message debatching: In general two schemas are configured in receive pipeline and called either from Adapter or Orchestration.
  • Orchestration debatching: Orchestration is designed to loop through until end of messages and splits by calling custom .NET component or using the xpath function in the orchestration expression editor.
  • Custom Pipeline debatching: Disassemble() and GetNext() methods of Pipeline disassembler component will be overridden to debatch the input messages.

September 1st, 2015 1:19am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics