Answered by:
BizTalk 2013 - Microsoft.BizTalk.Edi.Shared.EdiException: Error: 1 (Segment level error)

Question
-
Hi,
We recently converted an EDI->X12 project from BizTalk 2009 to 2013 and we started receiving this error
Error: 1 (Segment level error)
SegmentID: K1
Position in TS: 7
2: Unexpected segmentThe project has a custom SendPipeline component that we use to extract some data from the K1 segment and then move it into another segment. We then delete the K1 segment on the output.
The K1 segment is a customized segment that we have added into the schema.
The error occurs in the Execute function when trying to read the stream
new StreamReader(bodyPart.GetOriginalDataStream()).ReadToEnd().
If i change the send pipeline to XMLTransmit and bypass the custom component it works fine.
Regards,
Neil
Monday, October 13, 2014 2:37 AM
Answers
-
Hi Neil,
By Default, standard schema are referred by the pipeline, so you need to define the customized schema Under Transaction Set Settings --> Local Host Settings
You can go through following article : http://msdn.microsoft.com/en-us/library/bb246089.aspx and read the Schema discovery section for more clarification.
And if you have already done it, then try restarting the application and host instance.
_____________________________________________________________________________- Marked as answer by Angie Xu Monday, October 20, 2014 1:36 AM
Monday, October 13, 2014 6:41 AM
All replies
-
Hi Neil,
Check if you have deployed the schema which you have Customized. As the SendPipeline component is looking for K1 segment (which as per you is a custom element) and that it is not present in the standard schema (which it is referring now). So deploy the custom schema and refer to it.
_____________________________________________________________________________Monday, October 13, 2014 4:33 AM -
Hi,
When i go into the BizTalk admin and check the schema's deployed within the application it is showing the K1 segment.
Neil
Monday, October 13, 2014 4:39 AM -
Hi Neil,
By Default, standard schema are referred by the pipeline, so you need to define the customized schema Under Transaction Set Settings --> Local Host Settings
You can go through following article : http://msdn.microsoft.com/en-us/library/bb246089.aspx and read the Schema discovery section for more clarification.
And if you have already done it, then try restarting the application and host instance.
_____________________________________________________________________________- Marked as answer by Angie Xu Monday, October 20, 2014 1:36 AM
Monday, October 13, 2014 6:41 AM