I am trying to process the response message for an X12 278 message and the XML that is being produced does not seem to be following the schema properly.
When the raw/native format runs through the EDI pipeline, the message comes out looking like the following:
<ns0:X12_00501_278 xmlns:ns0="http://schemas.microsoft.com/BizTalk/EDI/X12/2006">
<ST>
<ST01_TransactionSetIdentifierCode>278</ST01_TransactionSetIdentifierCode>
<ST02_TransactionSetControlNumber>0001</ST02_TransactionSetControlNumber>
<ST03_ImplementationGuideVersionName>005010X216</ST03_ImplementationGuideVersionName>
</ST>
<ns0:BHT_BeginningofHierarchicalTransaction_TS278A1>
<BHT01_HierarchicalStructureCode>0007</BHT01_HierarchicalStructureCode>
<BHT02_TransactionSetPurposeCode>44</BHT02_TransactionSetPurposeCode>
<BHT03_SubmitterTransactionIdentifier>123456789</BHT03_SubmitterTransactionIdentifier>
<BHT04_TransactionSetCreationDate>20120313</BHT04_TransactionSetCreationDate>
<BHT05_TransactionSetCreationTime>1108</BHT05_TransactionSetCreationTime>
</ns0:BHT_BeginningofHierarchicalTransaction_TS278A1>
The message should look like the following:
<ns0:X12_00501_278 xmlns:ns0="http://schemas.microsoft.com/BizTalk/EDI/X12/2006">
<ST>
<ST01_TransactionSetIdentifierCode>278</ST01_TransactionSetIdentifierCode>
<ST02_TransactionSetControlNumber>0001</ST02_TransactionSetControlNumber>
<ST03_ImplementationGuideVersionName>005010X216</ST03_ImplementationGuideVersionName>
</ST>
<A3_BHT_Loop>
<ns0:BHT_BeginningofHierarchicalTransaction_TS278A3>
<BHT01_HierarchicalStructureCode>0007</BHT01_HierarchicalStructureCode>
<BHT02_TransactionSetPurposeCode>44</BHT02_TransactionSetPurposeCode>
<BHT03_SubmitterTransactionIdentifier>123456789</BHT03_SubmitterTransactionIdentifier>
<BHT04_TransactionSetCreationDate>20120313</BHT04_TransactionSetCreationDate>
<BHT05_TransactionSetCreationTime>1108</BHT05_TransactionSetCreationTime>
</ns0:BHT_BeginningofHierarchicalTransaction_TS278A3>
In the latter example, notice the inclusion of the *A3_BHT_Loop* element and also the fact that the BHT segment is now labelled properly as *BHT_BeginningofHierarchicalTransaction_TS278A3*.
Is there a setting that needs to be made to get the messages to resolve to the proper schema? Or is there something that should be in the response message to have the pipeline detect which format should be applied?