Question

I am trying to Parse stream Response using OopFactory X12 Parse
here is my Code

var parser = new X12Parser();
            var _response = response.GetResponseStream();
 Interchange interchange = parser.Parse(_response);
            string value = interchange.Serialize();
            response.Close();

it throws an error here parser.Parse(_response);

Error:
1 is not a valid subelement separator in position 105 of the file.

My Response File:

ISA*00*          *01*JILITTQQPK*ZZ*S00000000000001*ZZ*T00000000021261*120330*1048**00501*021465163*0*T*>

Note:

This only happens in my dev server, if i run my application on local this will work with no problem.

I wonder if response on dev is same as on local. How can capture stream response on dev and compare to my local?

Update


I captured my response to a file. this is how it looks.

ISA*00*          *01*NOPASS    *ZZ*S00000000000001*ZZ**120405*1000**00501*021539342*0*T*>~TA1*17049371*120405*1000*R*018~IEA*0*021539342~
Was it helpful?

Solution

ISA08 should contain 15 characters. In your response file, ISA08 does not have any data. Because of this, part of the TA1 segment is being parsed as part of the fixed-width ISA segment.

OTHER TIPS

Perhaps your response stream contains extra header information on the dev server. You should just add some extra lines to write the response to a file and see if it's purely the X12 message that is getting returned. You are also welcome to post your issue to http://x12parser.codeplex.com/discussions which might get more responses.

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